How can I get the index of the list that is visible in jQuery and store it in a variable? So for the instance slideshow below:
- I create a variable currSlides.
- I store the index of the visible li into currSlides
- currSlides should output as 3.
I will use that number to manipulate the slides.
<ul class="slides-container"> <li style="display:none">Image 1</li> <li style="display:none">Image 2</li> <li>Image 3</li> <li style="display:none">Image 4</li> </ul>