Created
April 4, 2013 17:08
-
-
Save andrewlaskey/5312157 to your computer and use it in GitHub Desktop.
Simple check if element exists function
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 checkIfExists = function(id) { | |
if (document.getElementById(id)) { | |
return true; | |
} | |
return false; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment