To run two Splide.js sliders concurrently on the same Webflow page without issues, you need to ensure each slider has a unique ID or class and is independently initialized in JavaScript.
slider-1
).slider-2
).splide
class alone for multiple sliders unless combined with specific IDs to prevent conflicts.tag or use a CDN Embed component and place it at the bottom of the page.
https://cdn.jsdelivr.net/npm/@splidejs/splide/dist/js/splide.min.js
).Add this script inside an Embed element or in Page Settings > Before tag:
Example initialization:
new Splide('#slider-1', { type: 'loop', perPage: 1 }).mount();
new Splide('#slider-2', { type: 'loop', perPage: 3 }).mount();
Each call to new Splide()
should target a unique ID, and define its own options.
.splide
or .splide__slide
styles that might impact both sliders.Uncaught
errors).To run two Splide.js sliders concurrently in Webflow, give each slider a unique ID, initialize them separately with specific options, and avoid shared global styling that may conflict. This ensures both sliders operate independently and reliably within the same page.