I did all the check boxes to select. Is there a better way?
$(document).on('change', '.smart-select-sheet .item-checkbox input[type="checkbox"]', function () {
var box = $(this).prop('checked');
var val = $(this).val();
if (val == 'all') {
$(this).parents('ul').find('input[type="checkbox"]').filter(function (index, el) {
if (index != 0) {
if ($(el).prop('checked') == !box) $(el).click();
}
});
} else {
if (box == false) {
var all = $(this).parents('ul').find('input[value="all"]');
if (all.prop('checked') == true) {
all.click();
$(this).prop('checked',!box).click();
}
}
}
});