I have a method addObject on a jQuery prototype which I have done using jQuery.fn.extend().
jQuery.fn.extend({
addObject : function(objectKey){
this[objectKey] = {};
}
});
Now I want to add a method addNewObject to its prototype. I am trying to emulate the below scenario
function addObject(){
...
}
addObject.prototype.addNewObject = function(){
...
}
How is my addObject accessible with new keyword?
jQuery.fn.addObject.prototype.addNewObject = function() {...this[objectKey] = {};?