I want to show an alert box when browser loses focus. So here is my code:
$(window).blur(function(e) {
alert("Your browser lost focus");
e.stopPropagation();
});
However, the alert box keep pop up, say when I use Alt+Tab to switch to another window. Can anyone help telling me what is wrong?