There was a bit of API change for Slider between 1.5.3 and 1.6. For full
details, take a look at this page

http://jqueryui.pbwiki.com/Slider

especially under Section 3 "Functional Specifications/Requirements:" and
subsection "Changes from 1.5, 1.6rc2 in refactor". This is still being
migrated over to the end-user documentation page, docs.jquery.com/UI/Slider.

The value method still exists but only works for a slider with one handle.
To get the value

var oldValue = $("#slider").slider("value");

To set the value

$("#slider").slider("value", 15) // new value

If you have a slider with multiple handles, the value method will simply get
and set the value of the first handle. For multiple handles, use the
'values' method, like so

$("#slider").slider("values", 1, 25); // set the 2nd handle (zero-based) to
25

So it's similar to the 'value' method, except that you have the extra index
argument. To get the value of the 3rd handle

var val = $("#slider").slider("values", 2);

- Richard

On Tue, Jan 20, 2009 at 8:11 PM, MetaYii <[email protected]> wrote:

>
> Hi, I got a problem when updating my jQuery UI. How to get the value
> of a slider's handle? The manual says that:
>
> $("#slider").slider("value", "1")
>
> would give the value of the handle "1", and it used to work with 1.5,
> but it doesn't work anymore: I get too much recursion here:
>
> too much recursion
> jquery.js
> Line 2555
>
> and here:
>
> too much recursion
> jquery.js
> Line 2345
>
> Using jQuery 1.3
>
> Is this a bug or did the API changed for this?
>
> Thanks in advanced.
> >
>

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