I have a temperature slider that can display temperatures in C or F
and I need to change the scale after the slider was initialized. I
used the $('#sliderElm').data('slider').options to change the min,
max, stepping, etc. but when I do that, the change and slide functions
get screwed up.
If I specifically set them using $('#sliderElm').data
('slider').options.change = function() {} and $('#sliderElm').data
('slider').options.slide = function() {} when I slide or change the
slider, I get multiple calls or executions of the functions (can't
tell exactly which). If I just reinitialize the slider with all the
options, including the change and slide options, the change is not
triggered when you simply click on the scale, as opposed to sliding
the slider. Also, the slider handle gets out of sink sometimes,
moving ahead of the mouse position.
I finally gave up and am using $('#sliderElm').slider('destroy') and
then re-initializing it every time I need to update the scale.
So I'm not sure if I was misusing the data() function or if the
multiple calls is a bug.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---