Scroll to slide based on id not index #565
-
Hi there, Is it possible to use the scrollTo() method to go to a slide by its id or custom data attribute as apposed to its index position? Essentially I have a drop down variant selector for a few products on a project of mine, and when clicked - the value on the selected option would match a slide ID and then scroll to that slide. Hopefully that makes sense TIA |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi @SidNewman, What version of Embla are you using? |
Beta Was this translation helpful? Give feedback.
-
@davidjerleke Thnaks so much! this can now be closed Also I am migrating to this package from swiper on all my projects 🎉 |
Beta Was this translation helpful? Give feedback.
@SidNewman I'm closing this as resolved?