Is there something I can do like this (perhap via a plugin)
if ( ! $(\'form#contact input]\').hasFocus()) { $(\'form#contact input:first]\').focus(); }
I know this is an old question, but may be my solution will help someone :)
since this didnt worked for me:
if ($(this)!=$(document.activeElement)) { ... }
..were "this" is returned from blur function. So i did this:
if ($(document.activeElement).attr("class") != "input_textbox"){ ... }