所以,我试图覆盖一个函数,但在该方法中包含它的原始方法jQuery.extend()
。
var origFunction = $.fn.pluginFunction;
$.fn.extend({
pluginFunction: function() {
// `origFunction` is available via Closure,
// now how can I declare the $.extended function here
// to preserve the original methods and then override
// only the following object?
myObject = {
'key1' : 'val1',
'key2' : 'val2',
}
}
});