开发者

jQuery cycle stop on start and than play

开发者 https://www.devze.com 2023-02-14 16:40 出处:网络
there is a way to stop jQuery Cycle plugin on init and than start it from another functio开发者_开发技巧n later in my code?

there is a way to stop jQuery Cycle plugin on init and than start it from another functio开发者_开发技巧n later in my code?

$('#cycle').cycle({
            fx: 'fade',
           // stop it
        });

// than play it


$('#anotherElement').click(function(){
     $('#cycle').cycle({ fx: 'fade', // stop it });
});


Here it is:

$('#s1').cycle({timeout:2000});

$('#pauseButton').click(function() { 
    $('#s1').cycle('pause'); 
});

$('#resumeButton').click(function() { 
    $('#s1').cycle('resume'); 
});
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号