I have a function that I want to be able to allow passing in either a regular javascript DOM element object or a jQuery object. If its not yet a jQuery object I will then make i
To test for a DOM element, you can check its nodeType property:
nodeType
if( elm.nodeType ) { // Was a DOM node }
or you could check the jQuery property:
if( elm.jquery ) { // Was a jQuery object }