<分区>
因此,我试图重写一个函数,但将它的原始方法包含在 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',
}
}
});