$("input[type='checkbox']:not(.simple)").iCheck({ //這裏的simple是指,使用這個的icheck的是內嵌的,使用simple後才能使用代碼
/* handle: 'checkbox' */
/* checkboxClass: 'icheckbox' */
checkboxClass: 'icheckbox_minimal' //默認樣式
});
//使用ON綁定事件
$("#selectAll").on('ifChecked', function(event){ //如果是選中,點擊後則爲不選中
$("tbody input").iCheck('check');
});
$("#selectAll").on('ifUnchecked', function(event){ //如果不選中,點擊後則爲選中
$("tbody input").iCheck('uncheck');
});
});
function del(){
if ($("input[name='errorBox']:checked").length>0) {
$.confirm("Are You Sure to Delete This?", {ok:function(){
$.post("${path}/arwen/uploadTrack/removeUploadTrack", $("input[name='errorBox']").serialize(), function(result) { //調用後臺方法
if (result.result) {
window.location.reload(); //重載並刷新
} else {
alert(result.message);
}
})
}})
}
}