Extending a jquery function

Extending a jquery function

 Hey people,

I want to extend the jquery functions .append and .appendTo. I need them to fire a change event when the functions are applied to a div element. I thought it would work like this:

var oldAppend = $.fn.append;
$.fn.append = function (content) {
   oldAppend.apply(this, content);
   $(this).change();
}



Didn't work :( Any ideas, let me know.

Greetz,

Rick