Skip to content

Instantly share code, notes, and snippets.

@jvandyke
jvandyke / gist:1262132
Created October 4, 2011 16:42
Function to determine if the given thing is an element.
/**
* Returns true if the given object is an element.
* @param thing {object/jQuery}
* @returns {boolean}
*/
function isDomElement(thing)
// If you would like this function to handle jQuery objects.
if (thing && thing.jquery) {
thing = thing.get(0);
}