0

What I have

I'm using Tiny Slider. I want to create click events on each of my slides to find out if the leftmost slide was clicked or another one was.

What I have tried so far

I thought that slider1.getInfo().displayIndex was the way to go until I realized the display index is not the same for a left navigation arrow event (gives you the rightmost slide number) and a right navigation arrow event (gives you the leftmost slide number). And then on top of that clicking on any slide and then printing out slider1.getInfo().displayIndex gives me the same index for each of my three slides.

So my question is:

How do I find out what is the index of my leftmost slide?

Tom Newton
  • 91
  • 1
  • 6
erlango3
  • 171
  • 3
  • 13

1 Answers1

0

I didn't receive answers, but I was able to find the solution. It's just as simple as one could wish for.

Basically, you just have to find the first class called .tns-slide-active in the DOM. These classes are added automatically to slides that are visible to the user.

erlango3
  • 171
  • 3
  • 13