- window.addEvent('domready', function()
- {
- var mySlide = new Fx.Slide('test',{
- duration:700,transition:Fx.Transitions.Sine.easeOut
- });
- mySlide.hide();
- $('toggle').addEvent('click', function(e){
- e = new Event(e);
- mySlide.toggle();
- e.stop();
- });
- });
I'm having problems to make work this script taken from demo mootools website:
then the css...
- #test {
- background: #222;
- color: #fff;
- padding: 10px;
- margin: 20px;
- border: 10px solid pink;
- }
- </style>
and then the html...
- <div id="test" class="test">
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- </div>
Basically I have two problems:
1) It's supposed that this script must work with one div, and actually works and the div is hide when the page is loaded, and then when I click in the toggle link the div disappears,
but unfortunatelly this div is an empty div (all blank), and all the content inside the div is not shown. It's really weird and annoying, isn't it?.
2) I'd like to use this script to hide and show many layers with the same id"test" and class"test", but although I have tested and read no less than 30-40 post, my poor acknowledge about mootools, or my poor copy/paste technique doesn't makes me to suceed. I have tried things like: $$('.test') to get the element and then each(function(), etc.. but nothing works!!
¿Is there someone that want to help to this poor mootools newbie?
I'm near to tears for this fact? I'm very, very tired to test all that I have seen in my google searchs!
Thank You in advance!!


