设定checkbox选中状态后,需要手工刷新
function chooseAll() {
if ($("#chkAll").checked) {$("input[name='itemIds']").each(function() {
$(this).prop('checked',true);
});
} else {
$('input[name="itemIds"]').each(function() {
$(this).prop('checked',false);
});
}
var set = $(this).attr("data-set");
var checked = $(this).is(":checked");
$(set).each(function () {
if (checked) {
$(this).attr("checked", true);
} else {
$(this).attr("checked", false);
}
});
$.uniform.update(set);
}