(function($){
$(window).focus(function(){
document.title = 'focused';
});
$(window).blur(function(){
document.title = 'not focused';
});
})(jQuery);
What it's supposed to do: if a tab is focused, the title should be 'focused'; if it's not, then title should be 'not focused'.
What it's doing in reality: after leaving a tab unfocused, its title will remain forever 'not focused'.
This is working fine in Firefox, but not in Chrome, anyone got suggestions? Thanks!