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
Answer
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>
No comments:
Post a Comment