YUI 范围滑块单独的子范围刻度大小
我的要求很典型。我需要一个价格范围双手柄滑块,其中根据当前手柄值,刻度大小(步长)将发生变化,例如,如果价格小于 1500,则刻度大小为 50。在 1500 到 15000 之间,刻度大小size 应变为 100,在 15000 到 50000 之间,刻度大小应变为 500,依此类推。我已经用 jquery 实现了这一点,但是还有其他问题(例如另一个句柄的自动调整),我无法解决。我现在用的是YUI。有没有办法根据当前句柄的值更改刻度大小?欢迎任何帮助。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您的意思是拖动时拇指跳跃的像素距离,请尝试以下操作:
如果您的意思是与拇指位置对应的值使用从像素位置到“实际”值的不同转换因子,则需要在您的函数中实现专为进行翻译而构建。
Presuming you mean the pixel distance the thumb hops when dragged, try this:
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.