problem with setting value in slider created with selectToUISlider plugin

problem with setting value in slider created with selectToUISlider plugin


Hi all,
Could somebody please hint me what I'm doing wrong.
In the last line of the fragment, I'm trying to set the time slider to
the maximum value.
The consoleLog line successfully prints: value = 0, min = 0, max = 1.
So my getter for the current value works ok, but the setter does not
seem to have any effect
(the last line).
ps > I changed one line in the script, the computation of increm, such
that the subsequent loop
will not hang even if options.labels is more than twice as big as
selectOptions.length
var increm = Math.max(1, Math.round(selectOptions.length /
options.labels));
Thanks,
Jonne.
         $('#selectId').selectToUISlider({
             labels: 7,
             sliderOptions: {
                    stop:
                        function(e, ui) {
                            console.log("Slider moved to " + ui.value);
                        }
                }
         }).next().attr('id', 'timeSlider');
         $('#selectId').hide();
         var min = $('#timeSlider').slider('option', 'min');
         var max = $('#timeSlider').slider('option', 'max');
         var val = $('#timeSlider').slider('option', 'value');
         consoleLog('Time slider: value = ' + val + ', min = ' + min + ',
max = ' + max);
         $('#timeSlider').slider('option', 'value', 1);