Skip to content

Instantly share code, notes, and snippets.

@andrewlaskey
Created April 4, 2013 17:08
Show Gist options
  • Save andrewlaskey/5312157 to your computer and use it in GitHub Desktop.
Save andrewlaskey/5312157 to your computer and use it in GitHub Desktop.
Simple check if element exists function
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