How to add pause button?
Closed this issue · 1 comments
anthonyjoddie commented
How to add pause button?
I try with this, ..no luck.
var slideshow = $('#divslide').slides();
var api = slideshow.data('slide');
// the pause code:
$('#pausebutton').click(function(){
slideshow.pause(); //--> is it correct?
});
I also tried:
api.slideshow.pause();
api.pause();
none of them working properly.
i-like-robots commented
api.pause()
is correct but your api
variable will be null
or undefined
because slideshow.data('slide')
will not return anything, what you want is slideshow.data('slides')
(plural).