How To find Out if Element is Wrapped by jQuery?

javascript, jquery

Solution

Here you go:

var isJQuery = obj instanceof jQuery;  // or obj instanceof $;

Problem

How can i find out if an Object is Wrapped by jQuery. ``` var obj = $('div'); if(obj is a jQuery wrapped object) { then do something } ``` I am quite new in the Javascript World. Thanks in advance.

Original source