jqueryui slider global settings
In jquery ui 1.7.* I used to do :
$.extend($.ui.slider.defaults,{object with defaults});
In 1.8 it doesn't work.
What's the standard wa开发者_Python百科y of setting defaults in 1.8 ?
Via the jQuery UI 1.8 upgrade guide, $.ui.foo.defaults
was moved to $.ui.foo.prototype.options
.
So for your example, you would set the defaults for all slider instances by:
$.extend($.ui.slider.prototype.options, { object with defaults });
精彩评论