Skip to content

Instantly share code, notes, and snippets.

@jorgemanrubia
Created November 24, 2010 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorgemanrubia/714101 to your computer and use it in GitHub Desktop.
Save jorgemanrubia/714101 to your computer and use it in GitHub Desktop.
JQuery selector for currently focused element
$.expr[':'].focus = function(a){
return (a == document.activeElement);
}
$(".:focus"); // The currently focused element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment