1、复选框全选:点击选中全选复选框,将其下的复选框全部选中(check选中)
$("#selectAll").on('ifChecked',function() {
$('input[name="select21"]').iCheck('check');
});
2、取消复选框:将其下的复选框取消(uncheck复选框没有被选中)
$('#selectAll').on('ifUnchecked', function(event){
$('input[name="select21"]').iCheck('uncheck');
});
3、复选框可以/禁止被选中
$('input[name="select31"]:eq(1)').iCheck('disable');禁止被选中
$('input[name="select31"]:eq(1)').iCheck('enable');可以被选中
4、判断复选框是否被选中,返回true或false
$('input[name="select31"]:eq(1)').is(':checked')
5、移除iCheck样式
$('input').iCheck('destroy');