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