This is the only thing I can think:
$(document).ready(function () {
$([window, document]).focusin(function(){
alert('hi');
}).focusout(function(){
alert('see you');
});
But it doesn't work. It should show an alert when not viewing the page, and another one when viewing the page. Of course this is not my final application but it should work that way. Any suggestion?
jQuery is loaded, other actions inside $(document).ready()
are working, no errors are shown...