jQuery UI Slider - max value (not end of slider)

混江龙づ霸主 提交于 2019-11-28 13:10:35

The problem lies with your values and trueValues arrays and how you're handling them in the getRealValue() function. You're overriding the slider defaults with the trueValues array.

I'm a little unclear as to why you want both values and trueValues. My interpretation of your code is that trueValues is what the slider's default values settings are, and values are some sort of user-defined values.

What you want to do is .concat() values and trueValues into a single array and use that new array for the slider values. You should keep range: 'min' and perhaps set max: 160 and min: -5 to make the slider render nicely.

Here's a working jsFiddle.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!