I have a jQuery plugin and I need to change it's default settings (and force these defaults settings for every instance of the plugin). Modifying its source code is not an option (updates etc), so I figured that if I proxy'd it, I would be home. So I looked up for an example, how you do that in JS:
var proxied = jQuery.ajax; // Preserving original function
jQuery.ajax = function() {
jQuery("#loading").dialog({modal: true});
return proxied.apply(this, arguments);
}
Now this code is quite straightforward, but
I'm not sure how can I proxy "element method", like $(".select").multiselect(); in similar fashion?