Created
May 24, 2024 00:53
-
-
Save lunule/41cff6a49562edf978e9c5e62205346f to your computer and use it in GitHub Desktop.
[Splide JS - Multiple Sliders on the Same Page] #splide #multiple #sliders
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const opts = { | |
// ... | |
} | |
document.querySelectorAll('.my-splide-class').forEach( function(carousel) { | |
const mySplide = new Splide( carousel, opts ); | |
// ... | |
mySplide.mount(); | |
)}; | |
// Or, if different classes and/or configs should be used, refer to the documentation: | |
// https://splidejs.com/guides/getting-started/#multiple-sliders |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment