I am using jQuery cycle plugin in one of my websites. I have activated the navigation links using pager: ‘#slide_pager’ option. Now I need to pause the slideshow when clicks on the link. So I have added
$('#slide_pager a').click(function(){
$('#S1').cycle('pause');
});
and my code for slideshow is
$('#S1').cycle({
fx: 'scrollLeft',
delay: -2000,
pager: '#slide_pager'
});
But when I click on the navigation links, the slideshow is not paused as desired. But if I put the same code for pausing the slideshow on Firebug console and hit run, it is working as desired. So I think the code is right. Please help me to find out the issue.
Try to use this
$(‘#S1’).cycle({
fx: ‘scrollLeft’,
delay: -2000,
pager: ‘#slide_pager’
});
$(‘#slide_pager a’).live(‘click’,function(){
$(‘#S1’).cycle(‘pause’);
});