Home >Web Front-end >JS Tutorial >Method to determine whether an object is a jquery object_jquery
This is often used when we use jquery's each to loop through, and sometimes we don't know what this refers to, because to use jquery's method, the object must be a jquery object.
In addition, to determine the type of a JavaScript object, you can use typeof,
But typeof can only determine the basic object of js (string, boolean, number, object)
Judge Whether an object is a jquery object can be determined by using obj instanceof jQuery
For example: