Load the page only when the window is open

Hello, webflowers. Is there any way (native or through some custom code) to make the website load only when its browser tab / window is open?

I have a jquery animation during the preload that I synchronized with the native features of the webflow. When I open my website and switch tabs to see something else and then return to the tab on my site, the jquery animation has already been completed, while the native webflow animations start playing again from where they left off.

Can anyone help me?

Thank you very much. :slight_smile: