How do I check if a variable is a jQuery object or plain DOM element?
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
精彩评论