if browsertab is active jquery
document.addEventListener('visibilitychange', function() {
if(document.hidden)
console.log('Page is hidden from user view');
else
console.log('Page is in user view');
});
if browsertab is active jquery
document.addEventListener('visibilitychange', function() {
if(document.hidden)
console.log('Page is hidden from user view');
else
console.log('Page is in user view');
});
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;
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us