Hey there, like the title says, I’m wondering if I can stop a gallery slider animation while the user is in another tab.
In the home page of my website I put a gallery slider with 5 images of different Villas, and each image triggers a box with the information and the link to that Villa’s page. On image switching, the box switches as well with an animation. I coded the gallery slider to stop animating onViewportLeave, which works very well, and start animating onViewportEnter. The problem is that if the user is on the slider viewport and switches to another tab, the gallery still animates, causing the images to switch and a bug on which when the user returns in my website tab, views the boxes superimposed on each other.
This is the correct Box for that Villa:
This is the bug I’m talking about: