0

So, i have two objects:

var object1 = $('div');
var object2 = {};

How i can define is this jQuery object, or not?

for javascript version < 1.4

0

3 Answers 3

2

Try checking it by using instanceof

var isJqueryObject = object1 instanceof jQuery

Sign up to request clarification or add additional context in comments.

1 Comment

yes, but this is JavaScript 1.4
1
var abc={};

if(typeof(abc.jquery)=="undefined"){

console.log("object is not a jquery object");

}else{

console.log("object is a jQuery object");

}

if object is jQuery object then

objectIdentifier.jquery =< version of jQuery>

1 Comment

Thank you, i find it on moderator's question link, and i will ise it
0

try it this way var isJQ = ( object1 && jQuery == object.constructor);

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.