Skip to content

Instantly share code, notes, and snippets.

@marsvogel
Created August 7, 2012 19:23
Show Gist options
  • Save marsvogel/3288592 to your computer and use it in GitHub Desktop.
Save marsvogel/3288592 to your computer and use it in GitHub Desktop.
JavaScript jQuery Check If Element Exists
/*
* Mit jQuery prüfen ob ein Element existiert.
*/
if ( $("#ElementID").length > 0 ) {
// Element exisiert
} else {
// Element exisiert nicht
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment