Adding slides to the slider with custom code: IX2 reinitializing?

Hi everyone,

We are adding multiple slides into the native sliders mask with custom code, when the page is loading. We´re doing this with some javascript.
After the slides has been added to the sliders mask, the sliders transition isn´t working anymore.

We thought, that we need to reinitialize webflow IX2 in order to make the slider work again after the slides has been added. We already treid that, without success.

But is this the case? Or do we need to redraw the slider component?
Apprechiate your help!


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

You have to restart slider not ix2, Webflow.require(‘slider’) will give you access to the slider APIs where there are functions to destroy and reinit the slider

Tried that, but only the first slide get´s translated in X now. The other slides do not move.

Our native slider has one slide at the beginning. Then we add 16 more slides to the slider mask.
Any ideas? Thank´s for the reply.

for (var i = 1; i < 16; i++) {
		const clone = cloneToClone.clone(true).appendTo(sliderMask);
		nextMonth();
		addMonthToCal(currentMonth, currentYear, clone, pastClass, bookedClass);//, dates.dates);
	}
	Webflow.require('slider').destroy();
	Webflow.require('slider').ready();
	Webflow.require('slider').redraw();