未捕获的类型错误(jQuery)-设置只读属性

3

我有一个bootstrap-switch设置,我只想将其中的一个项目设为只读。

我尝试了以下方法:

$('#charge').bootstrapSwitch('setReadOnly', true);

但是我得到了:无法读取未定义的属性“apply” HTML 代码如下:
<input name="name1" type="checkbox" class="item-types"
       id="charge"
       data-size="large"
       data-indeterminate="true"
       data-on-text="YES"
       data-off-text="NO" />

我做错了什么?

你正在使用哪个版本的bootstrapswitch?是V3吗? - Shaunak D
1个回答

2

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接