Dennis Martinez
Dennis Martinez

Reputation: 6512

Can I pause SlidesJS on click?

I am using SlidesJS for a slideshow and I was wondering if there is a way to pause and play the slideshow on click of a button?

Upvotes: 0

Views: 3709

Answers (3)

Dally S
Dally S

Reputation: 705

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);

Upvotes: 0

Loktar
Loktar

Reputation: 35309

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/

Upvotes: 3

Naveen Velaga
Naveen Velaga

Reputation: 646

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/

Upvotes: 1

Related Questions