On the website page there is a block with a counter. How to make the block disappear after the user has switched to this page. Let him open the page, after switching to another browser tab, at that moment on the page of the site you are looking for, the counter started, the user switches and after 3 seconds the block with the counter disappears.
1 answer
Here Javascript freaks write that Chrome and FireFox do not always trigger blur / focus events when the user switches tabs, and advised to use the HTML5 Visibility API .
|