Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hiding slides with display:none to filter them... way to 'recount' the slides after doing so #1794

Open
morrow95 opened this issue Mar 29, 2021 · 0 comments

Comments

@morrow95
Copy link

morrow95 commented Mar 29, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant