jQuery cycle stop on start and than play
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');
});
精彩评论