Created
August 7, 2012 19:23
-
-
Save marsvogel/3288592 to your computer and use it in GitHub Desktop.
JavaScript jQuery Check If Element Exists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * 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