As with other pseudo-class selectors (those starting with ":"), this is recommended to be preceded by: focus with the tag name or another selector; otherwise, a universal selector (" * ") is implied. In other words, bare $(':focus') equivalent to $('*:focus') .
If you need an alternative to $( document.activeElement ) that will retrieve the current element with focus, which you can use:
$(document).delegate( "*", "focus blur", function( event ) { var elem = $( this );
source share