Jquery set defaults for all instances of a plugin
- by Chris
Given the following plugin how would you set defaults for all the instances? I would like it to work the same as $.datepicker.setDefaults().
(function ($) {
$.fn.borderSwitcher = function (options) {
defaults = {
borderColor: 'Black',
borderWidth: '1px',
borderStyle: 'solid'
};
return this.each(function () {
…