I am using jQuery Cycle plugin to create an image slideshow. Now what I want to do is, say suppose I have 10 images in a container div for which I want to have the slideshow, now I want to stop that slideshow on a button click and restart it again on start button click. My code goes like this,
$("#startbtn").click(function()
{
$("#slideshow").cycle({fx: 'fade', timeout: 500});
});
$("#stopbtn").click(function()
{
$("#slideshow").cycle('stop');
});
I click stop button to stop the slide show. Now when I want to start my slideshow again I press the start button, now the funny thing is that the slideshow starts but only the first slide, rather first element of the container div goes through the transition and the slideshow just stops automatically, without any errors.