Can I pause SlidesJS on click?
I am using SlidesJS for a sl开发者_如何学Goideshow and I was wondering if there is a way to pause and play the slideshow on click of a button?
I recommend grabbing the most current version from github looks like in this new version its as simple as calling stop()
and play()
He has an example here showing how as well, notice the bottom left, has the option to play and stop.
http://beta.slidesjs.com/examples/standard/
Your required functionality will work in the Slides 2 beta, but not in any version below 2 you can check out how it works here : https://github.com/nathansearles/slides/
In your jquery.slides.js file do a search for _this.stop(true);
It shows about 3-4 times, next & previous click.. and you will also see it showing for paginationLink.click
The problem i was having was the slider was stop sliding after click either previous, next or pagination. I needed the slider to restart.. so what i did was add a setTimeout to play()
_this.stop(true);
setTimeout(function ()
{ _this.play(true) }, 3000);
精彩评论