我在我的网页上使用了这个引导多选 和这个复选框/收音机插件。突然,我注意到当 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 插件再次使多选工作?