我怎样才能使jQuery中的效果无限地工作,并且不会停止,因为当我现在运行它的时候,它只工作几秒钟(3秒)&在那之后停止。
例如:
$('div').effect('Slide');发布于 2012-02-01 16:40:31
setInterval(function(){$('div').effect('slide')}, 1000);发布于 2012-02-01 16:30:44
(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
});
})();https://stackoverflow.com/questions/9092820
复制相似问题