This is my first time posting, but I’ve been using Webflow for years now, and this Forum has been a great resource to us when solving development issues. But, this time it seems that we just can’t find the solution here and 've tried everything we could come up it without success.
By the way, we work with an exported Webflow code.
Background of what we do: We insert some DIV elements that have IX2 interactions after the Webflow page has loaded. But, after these DIV elements are inserted their respective interaction doesn’t work. We know why, but we can’t find a solution to INIT the interaction only for a specific element.
What we are trying to find is one of these two options:
1) Re-bind an element (after inserting it manually into the page with JS using x-templating) to its respective IX2 interaction after the DOM is loaded.
2) Re-init a specific interaction ID associated to an element without reloading the whole IX2 interactions library.
Also @danro we already did a lot of different test with the Webflow.require('ix2').init(); examples that you have posted in the Forum, but nothing seems to be close to solve what we’re trying to do. Do you think you could give us a hand on this one? Thanks!
We’ll take a look and see if IX2 supports the use cases you describe. In the meantime, are you able to share any other specifics? It would be helpful to know which events you are trying to bind on dynamic elements.
We have a mouse over and mouse out event on a Link element () and it’s bind in the Webflow interactions library to a class name, for examle: .inquiry-pli-cta-btn
Also, we’ve been able to redraw the Slider with this call: Webflow.require('slider').redraw();
So, the best world solution would be to be able to kind of call a redraw on a specific binding element in the array of Interactions, for example an interaction ID which would be something like e-82 … Webflow.require('INTERACTION_ID').redraw();
But, we think that this may not be possible. However, this type of control over the library would be something extremely powerful if it becomes available one day.
Hopefully, there’s a way of doing we didn’t thought through yet…
Thanks for the reply. It sounds like this may not be possible with our current system. During initialization, all IX2 events are bound at once, and we do not yet have a way to initialize them on a case by case basis.
We do appreciate the feedback, and hope to provide a more powerful solution in the future.