1

我在我的网页上使用了这个引导多选 和这个复选框/收音机插件。突然,我注意到当 icheck 放入多选时,没有默认和自定义的多选功能!这是我没有 icheck 插件的工作:Fiddle 这是带有 icheck 的小提琴,其中多选功能不起作用我也需要使用 icheck 的功能:

$('#data-type').multiselect({
    includeSelectAllOption: true,
    buttonWidth: '90%',
    nonSelectedText: 'Select multiple option',
    onChange: function(element, checked) {
        var selectedOptions = $('#data-type option:selected');

        if (selectedOptions.length == 0) {
           // Custom code
           alert('All are unchecked!');
        }
    }

});

$('input').iCheck({
    checkboxClass: 'checkbox-default',
    radioClass: 'radio-default',
});

如何使用 icheck 插件再次使多选工作?

4

1 回答 1

1

这是 iCheck https://github.com/fronteed/iCheck/issues/68中的一个错误。该错误已在版本 2 中修复。也iCheck被替换为icheck. 这是您的示例http://jsfiddle.net/koa58o4o/1/

$('input').icheck({
    checkboxClass: 'checkbox-default',
    radioClass: 'radio-default',
});

使用“全选” http://jsfiddle.net/koa58o4o/4/

于 2014-09-29T19:34:37.330 回答