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
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
Try checking it by using instanceof
var isJqueryObject = object1 instanceof jQuery
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>