Ticket #2499 (closed enhancement: invalid)
UI Slider changing slider on the fly
| Reported by: | istvano | Owned by: | joern |
|---|---|---|---|
| Priority: | major | Milestone: | 1.2.4 |
| Component: | qunit | Version: | 1.2.3 |
| Keywords: | ui slider | Cc: | |
| Blocking: | Blocked by: |
Description
Hi Guys,
I have the situation when, based on an ajax request I need to change the slider range on the fly. The possible values the slider can select.
I am willing to write it, I just need some help how this should be implemented.
now, when the slider is created you have the min, max, steps
all I need is a function to change those values. also I do not know if I need to do anything else apart from changing the slider values, which can be done easily,
Thanks a lot,
Change History
comment:1 Changed 5 years ago by joern
- Status changed from new to closed
- Resolution set to worksforme
comment:2 Changed 5 years ago by istvano
Thanks for that, :( I checked the code so the option, but I though there has to be some more code executed as the values are changing :)
Thanks again,
comment:3 Changed 5 years ago by istvano
- Status changed from closed to reopened
- Resolution worksforme deleted
Hi,
I am still having problems with this functionality, it DOES not seem to work,
if I create a slider:
this._slider = $("#slider").slider({
startValue:0, minValue: 0, maxValue: 9, stepping: 1,
});
It creates the slider, and works fine, later in my code,
I do the following:
this._slider.data("stepping.slider", 1); this._slider.data("minValue.slider", 0); this._slider.data("maxValue.slider", 4);
It still have 9 steps and, even if I check it later on with a new call what does the data holds, gives me back min:0, max: 4, stepping:1, but still the slider itself has 9 steps etc.
Thanks for any help,
Istvan
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

You can update all options on the fly using the data method. Its currently hard to find, due to lack of (public) documentation, but that'll be available soon: http://docs.jquery.com/UI/Guidelines#jQuery.data
To change the minValue option:
slider.data("minValue.slider", -10);