简体   繁体   English

自定义JQuery滑块灵敏度

[英]Customizing JQuery Slider sensitivity

In my ASP.Net MVC project, I have used JQuery slider to allow user selecting a big range of values. 在我的ASP.Net MVC项目中,我使用了JQuery滑块来允许用户选择较大范围的值。 The range is from 0 to 100000. Unfortunately, I cannot provide good amount of space for the slider looking at limitations of my app size and the UI requirements altogether. 范围从0到100000。不幸的是,我无法为滑块提供足够的空间,因为它们无法完全满足我的应用程序大小和UI要求的限制。 Hence the slider is given a width of approx 1 - 2 inches only. 因此,滑块的宽度仅为1-2英寸。

The problem is that, when user moves this slider on screen, the values in aligned textbox jumps very fast (in thousands). 问题是,当用户在屏幕上移动此滑块时,对齐的文本框中的值跳得非常快(以千为单位)。 And user is not able to select small values say 400 or 500 etc. This is obvious because of the small space and high range combination. 而且用户无法选择较小的值,例如400或500等。这是显而易见的,因为其空间较小且组合范围较大。 I agree. 我同意。

However, client is not ready to accept this and somehow wants me to reduce the sensitivity of the slider such that it will show values in 100s while sliding. 但是,客户尚未准备好接受此请求,并且以某种方式希望我降低滑块的灵敏度,以使其在滑动时显示100秒的值。

Is there any way to achieve this using exposed events and properties of Jquery slider? 有什么方法可以使用公开的事件和Jquery滑块的属性来实现此目的?

I am using JQuery-1.6.2.js for this purpose. 我为此使用JQuery-1.6.2.js。

初始化大小为100的滑块。然后可以降低灵敏度移动滑块。

$( ".selector" ).slider({ step: 100 });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM