Scenario... say I have 10 slides and 5 of those are pictures of cats while the other 5 are pictures of dogs. User clicks a button to show only dog pictures. I set the <li> of all the cat slides to display:none. Great... only the dog slides show, BUT the previous/next and 'count' of flexslider is now off.
Any way around this? Like a way to tell flexslider to 'recount' the slides (assuming the hidden ones would not be counted)? Or even just destroying the current and re-initializing the slider?
removeSlide() and addSlide() are of no use to me to solve this because I need the entire 'set' always there... I can't remove the cat sliders and then add them back later. My actual use case checks my db every 15 seconds and uses addSlide() to add newly found images in chronological order. So while I could remove the slides instead of settings them to display:none I wouldn't be able to 'get them back' later in this specific case.
Scenario... say I have 10 slides and 5 of those are pictures of cats while the other 5 are pictures of dogs. User clicks a button to show only dog pictures. I set the
<li>
of all the cat slides todisplay:none
. Great... only the dog slides show, BUT the previous/next and 'count' of flexslider is now off.Any way around this? Like a way to tell flexslider to 'recount' the slides (assuming the hidden ones would not be counted)? Or even just destroying the current and re-initializing the slider?
removeSlide()
andaddSlide()
are of no use to me to solve this because I need the entire 'set' always there... I can't remove the cat sliders and then add them back later. My actual use case checks my db every 15 seconds and usesaddSlide()
to add newly found images in chronological order. So while I could remove the slides instead of settings them todisplay:none
I wouldn't be able to 'get them back' later in this specific case.