HI,

I've been integrating the slider into a Drupal 6 site. Due to Druapl's
slightly older built in version of jQuery, I'm using jquery.ui 1.6.

I've been having trouble getting the sliders to initialize properly.
No matter what I give in the value key for the options when I init, it
always sets to 1. When I use the sliders they work nd update my form
field,

Here's the code I'm using, (note that Drupal.behaviors.myBehavior is
the drupal way of registering a document ready function):

<code>
Drupal.behaviors.myBehavior = function() {
        var slidercount = 0;

        $(".proficiency-slider").each(function(){
                var displayField = '#edit-field-tools-' + slidercount + '-tool-
proficiency';
                var sliderValue = $(displayField).val();
                if (!sliderValue) { sliderValue=1; }
                $(this).slider({
                        animate: true,
                        min: 1,
                        max: 10,
                        step: 1,
                        slide: function(event, ui) {
                                $(displayField).val(ui.value);
                        },
                        value: parseInt(sliderValue)
                });
                slidercount++;
        });
}
</code>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to