Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

window.focus and window.blur jquery

$(window).focus(function() {
  console.log('user is watching this page');
});

$(window).blur(function() {
  console.log('user is not watching this page');
});
 
PREVIOUS NEXT
Tagged: #jquery
ADD COMMENT
Topic
Name
7+5 =