I have a div that I am using custom javascript to duplicate depending on a number of inputs from the user. Let’s just say, for simplicity, that the user picks 5 items and these 5 items show up on the next page as tabs. I have applied an animation to an individual div on the page, where this div is then duplicated and the innerHTML is replaced in the JS. I am confused because the animation is not showing up on these duplicates despite them having the exact same class. Is this something that is possible with webflow?
Interactions ( aka IX2 ) initialized on page load for the elements it can see. When you create elements with JS later, you need to re-initialize IX2.
Add this after your DOM changes;
Webflow.require('ix2').init();
I don’t actually use interactions much, but you can find quite a few good discussions here in the forum. I’d probably search for “ix2” and “initializing”, “re-initializing”…
You could also do a Webflow.destroy() and re-initialize the entire Webflow.js framework. Page interactions might be initialized differently.