SaurabhLP
SaurabhLP

Reputation: 3657

slideIn after slideOut in mootools 1.1

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...

Upvotes: 0

Views: 87

Answers (1)

Niels Keurentjes
Niels Keurentjes

Reputation: 41968

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

mySlide.slideOut().slideIn.delay(5000, mySlide);

Upvotes: 2

Related Questions