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

Easy slider with dynamic content, arrows and dots #388

Open
momorigo opened this issue Nov 10, 2023 · 0 comments
Open

Easy slider with dynamic content, arrows and dots #388

momorigo opened this issue Nov 10, 2023 · 0 comments

Comments

@momorigo
Copy link

Thank you for this very useful library!

I want to create a dynamic slider containing a variable number of elements, displaying two elements at a time, all with arrows
and dots. I'm using vanilla JS. So I've tried to mix between the "arrows and dots" and "dynamic content" examples available on the website :
https://codesandbox.io/s/github/rcbyr/keen-slider-sandboxes/tree/v6/navigation-controls/arrows-and-dots/javascript?file=/index.html
https://codesandbox.io/s/github/rcbyr/keen-slider-sandboxes/tree/v6/media/dynamic-content/javascript?file=/index.html

The problem is that I can't get dots and arrows to work dynamically. I suppose it might be just a simple trick with the "detailsChanged" event but I can't find it... Thanks for your help!

Here's my code: https://codesandbox.io/s/keen-slider-dynamic-content-with-dynamic-arrows-and-dots-cyfy4p?file=/index.html

PS: it's less important but by the way, is it possible to generate a dot not per element but according to "perView" (or anything equivalent) in order to slide the elements 2 by 2? If yes, how?

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