jQuery UI slider - Cannot call method 'addClass' of undefined

后端 未结 7 1410
我在风中等你
我在风中等你 2021-01-07 21:50

I had this old jQuery UI slider that had worked just fine a few months ago, but now I seem to be getting an exception reading: Cannot call method \'addClass\' of undefined.

7条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-07 22:29

    I had this issue with latest versions, too. The solution is easy: use parseInt() to pass dynamic values to sliders

    Setter example for jquery ui slider:

        $("#mySlider").slider("option",{min: parseInt(value.min), max:parseInt(value.max),value: parseInt(value.active)});
    

提交回复
热议问题