Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var window_focus;
- $(window).focus(function() {
- window_focus = true;
- })
- .blur(function() {
- window_focus = false;
- });
- $(document).ready(function() {
- setInterval(function() { alert('Focus: '+window_focus+'') }, 1000);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement