Created
December 20, 2012 07:50
In case you do not have jQuery or any other library, just this to check whether an element is exist or not taken from http://stackoverflow.com/questions/5629684/javascript-check-if-element-exists-in-the-dom
This file contains 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
var element = document.getElementById('elementId'); | |
if (typeof(element) != 'undefined' && element != null) | |
{ | |
// exists. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment