jQuery: The Write Less, Do More JavaScript Library

Click on slider doesn't call any callback

View: New views
4 Messages — Rating Filter:   Alert me  

Click on slider doesn't call any callback

by diggerk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello all,

Please help to understand me if it's a slider bug or my
misunderstanding.
I'm using ui.slider component to replace standard scroller with custom
(pretty) one. When I move the handle with mouse, "slider" callback is
called and I change "scrollTop" property of my div, and it works
perfectly. But if I click somewhere on the slider, the handle moves
there but none of slider callbacks (change, slide, stop) is called. Is
it a bug? Is there a workaround? Help please, I don't want to include
one more javascript library into the project, we were happy with
jquery until now.

Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to jquery-ui@...
To unsubscribe from this group, send email to jquery-ui-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Click on slider doesn't call any callback

by narkat@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


the "hack" for this behavior is simple ;)

in the ui.slider.js at ~ line 231 in the click-function.:
the last call done in that function is to "this.moveTo".

the last parameter wich is passed "moveTo" is a true,
change it to false and it'll work :)

when the guys from the ui-team change this in oncoming version,
this could be a practicable fix ;)

greetings
Jan


On Apr 17, 12:18 pm, digger <digg...@...> wrote:

> Hello all,
>
> Please help to understand me if it's asliderbug or my
> misunderstanding.
> I'm using ui.slidercomponent to replace standard scroller with custom
> (pretty) one. When I move the handle with mouse, "slider" callback is
> called and I change "scrollTop" property of my div, and it works
> perfectly. But if I click somewhere on theslider, the handle moves
> there but none ofslidercallbacks (change, slide, stop) is called. Is
> it a bug? Is there a workaround? Help please, I don't want to include
> one more javascript library into the project, we were happy with
> jquery until now.
>
> Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to jquery-ui@...
To unsubscribe from this group, send email to jquery-ui-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Click on slider doesn't call any callback

by diggerk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Jan, thanks a lot, just found that hack by myself yesterday :) Anyway
the default behavior is a bit strange.

Andrew

On Apr 21, 5:01 pm, "nar...@..." <nar...@...> wrote:
> the "hack" for this behavior is simple ;)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to jquery-ui@...
To unsubscribe from this group, send email to jquery-ui-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Click on slider doesn't call any callback

by narkat@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


indeed this behavior should be changed in the next version :)

greetings
Jan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to jquery-ui@...
To unsubscribe from this group, send email to jquery-ui-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---