How do I che开发者_运维技巧ck if a variable is a jQuery object or plain DOM element?
- A jquery object has a
jqueryproperty. - A jquery object is an
instanceof jQuery(instanceofon MDN) - A DOM element has a
nodeTypeproperty
How do I che开发者_运维技巧ck if a variable is a jQuery object or plain DOM element?
jquery property.instanceof jQuery (instanceof on MDN)nodeType property
精彩评论