How do I check if a variable is a jQuery object or plain DOM element?
Answer
- 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 check if a variable is a jQuery object or plain DOM element?
Answer
jquery
property.instanceof jQuery
(instanceof
on MDN)nodeType
propertyIn the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...
No comments:
Post a Comment