i-like-robots/jQuery-Slideshow

Multiple slideshow

Closed this issue · 1 comments

I have several divs with class slideshow (that's what I really need, the amount of divs can differ from time to time).

$slideshow = $('.slideshow).slides
  skip: no
  pagination: no
  transition: 'crossfade'
  auto: 1500
  loop: yes

works pretty well. but when I tried to access api

api = $slideshow.data 'slides'

I get control only for the first div. I want to play/pause slideshow on div I mouseenter/mouseleave, but it play/pause only the first div.

You need to select your target element from the returned collection with jQuery's .eq() method else the .data() method will only return "the named data store for the first element in the set of matched elements".

var $slideshow = $('.slideshow').slides();
var api = $slideshow.eq(2).data('slides');