How can reInit Splide instance?

How can i reinit splide instance if i using query loop for nestable slider?

To reinitialize a Splide instance (a popular JavaScript slider/carousel library), you can use the destroy method followed by the mount method. This essentially removes the existing instance and then creates a new one.

Here’s an example:

javascript

// Assuming splide is your Splide instance
var splideElement = document.querySelector('#yourSplideElementId');
var splideOptions = {
  // your options here
};

// Initialize Splide
var splide = new Splide(splideElement, splideOptions).mount();

// Later, when you want to reinitialize the Splide instance:
splide.destroy();
splide = new Splide(splideElement, splideOptions).mount();

This ensures that the old Splide instance is destroyed, and then a new one is created and mounted on the same element. Adjust the splideElement and splideOptions variables according to your HTML structure and desired configuration.
Instagram Audio Downloader

1 Like