Skip to content

Instantly share code, notes, and snippets.

@robinvdvleuten
Created March 9, 2011 07:53
Show Gist options
  • Save robinvdvleuten/861848 to your computer and use it in GitHub Desktop.
Save robinvdvleuten/861848 to your computer and use it in GitHub Desktop.
jQuery - Check if element exists
$.fn.exists = function() {
return $( this ).length > 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment