With pure javascript:
this === document.activeElement // where 'this' is a dom object
or with jquery’s :focus pseudo selector.
$(this).is(':focus');
With pure javascript:
this === document.activeElement // where 'this' is a dom object
or with jquery’s :focus pseudo selector.
$(this).is(':focus');