I just read, I think all the thread that deals with this subject, and I can\'t find a real solution to my problem. I need to detect when the browser window loses its focus, i.e.
You can use jQuery's blur method on window, like so:
$(document).ready(function() { $(window).blur(function() { // Put your blur logic here alert("blur!"); }); });
This works in Firefox, IE, Chrome and Opera.