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 jQuery object, you can use the instanceof operator:
instanceof
if(elm instanceof jQuery) { ... }
or:
if(elm instanceof $) { ... }