How do I check if a variable is a jQuery object or plain DOM element?
Answer
- A jquery object has a
jqueryproperty. - A jquery object is an
instanceof jQuery(instanceofon MDN) - A DOM element has a
nodeTypeproperty
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