Horje
javascript detect  if the browser tab is active Code Example
javascript detect if the browser tab is active
var interval_id;
$(window).focus(function() {
    if (!interval_id)
        interval_id = setInterval(hard_work, 1000);
});

$(window).blur(function() {
    clearInterval(interval_id);
    interval_id = 0;
});




Javascript

Related
javascript count number of occurrences in array of objects Code Example javascript count number of occurrences in array of objects Code Example
animation react native npm Code Example animation react native npm Code Example
Recursive reverse string Code Example Recursive reverse string Code Example
array intersection javascript es6 Code Example array intersection javascript es6 Code Example
pug to html Code Example pug to html Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8