开发者

jqueryui slider global settings

开发者 https://www.devze.com 2023-02-03 21:25 出处:网络
In jquery ui 1.7.* I used to do : $.extend($.ui.slider.defaults,{object with defaults}); In 1.8 it doesn\'t work.

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 });
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号