views:

9

answers:

1

My requirement is typical. I need a price range dual-handle slider, where based on the current handle value, the tick size (step size) will change, for example if price is less that 1500, the tick size is 50. between 1500 and 15000, the tick size should become 100, between 15000 to 50000 the tick size should become 500, and so on. I have achieved this with jquery, but there are other issues (like auto adjust of the other handle), which I cannot solve. I am now using YUI. is there a way to change the tick size based on the value of the current handle? any help is welcome.

A: 

Presuming you mean the pixel distance the thumb hops when dragged, try this:

var thumb = dualSlider.maxSlider.thumb;
thumb.setXConstraint(thumb.leftConstraint, thumb.rightConstraint, newTickSize);

If you mean the value that corresponds to the thumb placement uses a different conversion factor from pixel position to "real" value, that would need to be implemented in the function you built to do that translation.

Luke