Folks,
Someone refreshes all their tabs. My tab is in a non-active non-foreground tab.
This runs: jQuery(document).ready().
So:
- How do I get my animation to run only when the tab becomes active?
AND
- How do I get it to run if the tab is foreground and active anyway?
I have tried:
<script>jQuery( document ).ready(function() { jQuery(window).focus(function () { setTimeout(function(){ jQuery('.juiz-outdated-message').addClass('active'); }, 500); }); });</script>
This happens on so many sites I can't find any resources on how to do it, though?!