iCheck 的简单了解

一. 常用方法改变iCheck的状态
1. 使拿到的iCheck标签选中
$('#input-1, #input-3').iCheck('check');
2. 使拿到的iCheck标签非选中
$('#input-1, #input-3').iCheck('uncheck');
3. 使拿到ICheck标签不可点击
$('#input-2, #input-4').iCheck('disable');
4. 使拿到ICheck标签可点击
$('#input-2, #input-4').iCheck('enable');
5. 移除iCheck样式
$('input').iCheck('destroy');




二. 常用回调事件,监听iCheck的change事件.


事件名称 使用时机
ifClicked 用户点击了自定义的输入框或与其相关联的label
ifChanged 输入框的 checked 或 disabled 状态改变了
ifChecked 输入框的状态变为 checked
ifUnchecked checked 状态被移除
ifDisabled 输入框状态变为 disabled
ifEnabled disabled 状态被移除
ifCreated 输入框被应用了iCheck样式
ifDestroyed iCheck样式被移除
例. iCheck 的选中事件
$('input').on('ifChecked', function(event){
  alert(event.type + ' callback');
});
例. iCheck 的取消选中事件
$(document).on("ifUnchecked", "input", function(event){
  alert(event.type + ' callback');

}

详情请参见http://www.bootcss.com/p/icheck/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值