Skip to content

Instantly share code, notes, and snippets.

@lunule
Created May 24, 2024 00:53
Show Gist options
  • Save lunule/41cff6a49562edf978e9c5e62205346f to your computer and use it in GitHub Desktop.
Save lunule/41cff6a49562edf978e9c5e62205346f to your computer and use it in GitHub Desktop.
[Splide JS - Multiple Sliders on the Same Page] #splide #multiple #sliders
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