问题描述
我使用jquery-1.10.2和jquery.mobile-1.3.2和$(.rs").rangeslider();$(.rs").rangeslider('refresh');当我尝试通过js添加Rangeslider时无法正常工作.错误是:未捕获的TypeError:无法读取未定义的属性滑块"
I use jquery-1.10.2 and jquery.mobile-1.3.2And$(".rs").rangeslider();$(".rs").rangeslider('refresh');not working when i try to add rangeslider by js.Error is: Uncaught TypeError: Cannot read property 'slider' of undefined
.slider()也无法正确刷新滑块.刷新后没有数字字段.
Sliders are not refresh correctly too by .slider(). There is no number field after refresh.
jquerymobile api中是否存在刷新滑块的问题或我的错误?
Is there problem in jquerymobile api for refreshing sliders or my mistake?
推荐答案
范围"滑块增强方法似乎无法正常运行.与拨动开关不同,可以使用.slider()
进行增强.
It seems that Range slider enhancement methods aren't functioning as they should. Unlike toggle switch, which can be enhance using .slider()
.
要增强动态插入的滑块,您需要调用
To enhance slider dynamically inserted, you need to call
$('[data-role=page]').trigger('pagecreate');
这篇关于如何在jquerymobile中刷新rangeslider的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!