how can I make the effect in jQuery works for infinite and won't stop, Since when I run it right now, it works only for a couple of seconds(3 sec) & stop after that.
ex:
$('div').effect('Slide');
how can I make the effect in jQuery works for infinite and won't stop, Since when I run it right now, it works only for a couple of seconds(3 sec) & stop after that.
ex:
$('div').effect('Slide');
(function looper(){
// use callback function of the effect to call the outer looper function recursively.
$('div').effect('Slide', function(){
setTimeout(looper, 25); // add a timeout of needed
});
})();