I ha a problem extending DOM elements with the $.extend() function.
My code is:
var lClass = function myClass(){} ;
lClass.method1 = function(){alert('hello world');}
lClass.property1 = "hello property1";
var lObj = $("#elementId");
$.extend(lObj, lClass);
lObj.method1(); //this works fine
$.extend($("#elementId"),lClass);
$("#element").method1(); //this is supposed to work but it does not
My question is. Why the function $.extend() does no extend the $("#elementId")?
Is there any way in jquery to extend DOM elements in a similar way?
Ibon Uria