Question

I am trying to build a custom code in mootools 1.1, what am doing is when you click a button the container slideOut first and delay for few seconds let say 2sec then slideIn again, firstly the container is open...

The code:-

$('showMore').addEvent('click', function(e){
   e = new Event(e);
   mySlide.slideOut().delay(5000).slideIn();
   e.stop();
});

The code is not working, it slides out but not the next one...

Was it helpful?

Solution

Read the documentation on the delay function - you invoke it on the function, not the object.

mySlide.slideOut().slideIn.delay(5000, mySlide);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top