Search code examples
jqueryjquery-uijquery-ui-slider

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 way of setting defaults in 1.8 ?


Solution

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