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

How can I set multiple arrows for a glider? #233

Open
karlosmrez opened this issue May 17, 2022 · 1 comment
Open

How can I set multiple arrows for a glider? #233

karlosmrez opened this issue May 17, 2022 · 1 comment

Comments

@karlosmrez
Copy link

karlosmrez commented May 17, 2022

I have created a navi with Glider.js.

When I click on "Category 1", it slides to "Category 2", but when I click on "Category 2", it doesn´t slide to the end.

How can I slide to the end of the slide, if I defined 2 diferents next-arrows in HTML?

https://codepen.io/karlosmrez/pen/QWQpwrv?editors=1010
(X returns back)

@karlosmrez
Copy link
Author

I found a solution adding "onclick" in HTML:

<span class="c-nav__item c-nav__item--menu" onclick="next()">A 1 ></span>

And this in JavaScript:

function next() {
  glide.scrollItem(glide.slide + 1)
}

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