I have a Bootstrap site and am trying to add 3 animations to a slider, for each one to play when the slide is visible.
The first one plays fine because the containing div is visible onload however the other slides are not visible, so trying to target them onclick of the next arrow, with something like below but getting this error because the animation isn’t on the page initially: Uncaught TypeError: this.player.addEventListener is not a function
LottieInteractivity.create({
player:'#animation-2',
mode:"cursor",
actions: [
{
type: "click",
forceFlag: false
}
]
});