Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

RangeSlider changing theme #5918

Closed
demonslord opened this issue Apr 22, 2013 · 3 comments
Closed

RangeSlider changing theme #5918

demonslord opened this issue Apr 22, 2013 · 3 comments

Comments

@demonslord
Copy link

Hi, what is a best way to changing data-theme of RangeSlider?

I want use internal _setOption, but it gives me this error:

TypeError: Function.prototype.apply: Arguments list has wrong type

jsfiddle: http://jsfiddle.net/LLtaj/2/

Using:
jQuery 1.8.2
JQM 1.3.1

Thanks.

@ghost ghost assigned arschmitz Apr 22, 2013
@arschmitz
Copy link
Contributor

@demonslord Thanks for reporting this im going to take a look because this should work

@demonslord
Copy link
Author

Thanks arschmits.

Please look this example: http://jsfiddle.net/LLtaj/6/

maybe I'm doing it wrong, but i can't set the property value by internal _setOption.

Best Regards.

@gabrielschulhof
Copy link

@arschmitz The reason for the error is that you were calling this._superApply( options ); from _setOption(). _superApply is just like apply in that you need to pass in an array of arguments. Most often you'll want this._superApply( arguments );.

Also, I don't believe you need to implement _setOption if you've implemented _setOptions because the widget factory always calls _setOption from _setOptions and it processes .widgetname( "option", "optionName", newValue ) via _setOptions. So, even if a single option is changed, it still calls _setOptions() with a hash containing a single key.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.