Вопрос

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

Это было полезно?

Решение

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

mySlide.slideOut().slideIn.delay(5000, mySlide);
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top