The change event fires when the mouse is released (slide stop) - which updates 
the value correctly on mouse release.

But, is there no way to get a accurate real-time value while the mouse is held 
down while dragging it all the way left and then right?

Even if I let go of the mouse with the slider all the way left, the value 
doesnt change again until the second step when sliding it back to the right. 
This is a strange (non-intuitive) behavior.

I guess I need to subtract 10 from the slide event value if the previous value 
was higher....and add 10 if the previous value was lower. And keep the change 
event as is.



From: mus...@hotmail.com
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Slider Values Not Accurate at Ends
Date: Mon, 1 Jun 2009 21:50:23 -0500








Oh geez. I totally missed that change event :0

Thank you much for your help/time.

-Kevin

Date: Mon, 1 Jun 2009 22:39:34 -0400
Subject: [jQuery] Re: Slider Values Not Accurate at Ends
From: rdwo...@gmail.com
To: jquery-en@googlegroups.com

Sorry, I was going off your previous instructions, so I was looking for 0 and 
10. Now that I've had a closer look at your code, I see what the source of the 
problem is. You want to use the change event, in addition to the slide event:


http://docs.jquery.com/UI/Slider#event-slide


http://docs.jquery.com/UI/Slider#event-change

The slide event updates while you slide it around. At the point at which slide 
is triggered, the slider does not yet have the new (proposed) value. The value 
is accessible in ui.value, so that you can return false if you don't want to 
allow it. But during slide if you check the value option or method, you'll get 
the current (soon to be previous) value.


The change event fires at the very end, after it has stopped sliding and has a 
new value.

- Richard

On Mon, Jun 1, 2009 at 10:27 PM, Musixz Man <mus...@hotmail.com> wrote:






Yes, I'm still experiencing the issue with the output on jsbin.

Slide the top slider all the way to the left. It SHOULD show 80:20 (20 being 
the slider value).

For me, it shows 70:30. But when I then move it back one step to the right...it 
then shows 80:20.


Are you getting a different result?

Thanks!

Date: Mon, 1 Jun 2009 21:29:54 -0400
Subject: [jQuery] Re: Slider Values Not Accurate at Ends
From: rdwo...@gmail.com

To: jquery-en@googlegroups.com


On Mon, Jun 1, 2009 at 9:10 PM, Musixz Man <mus...@hotmail.com> wrote:







Richard,

No, I just include the default jQ ui.js and call $(#element).slider
The css in ui.slider.css is functional. It's also present in any complete 
jQuery UI theme.
 



http://jsbin.com/abuxi


I think I did that right....
You did, but the idea is to reproduce your error there so we can see it. I'm 
not, are you?

- Richard

Windows Live™: Keep your life in sync. Check it out.



Insert movie times and more without leaving Hotmail®. See how.
_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009

Reply via email to