您的位置:首页 > Web前端 > BootStrap

bootstrap中icheck的使用案例

2015-03-30 17:17 453 查看
$(document).ready(function(){

$("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);
}
})
}})
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息