lulu ui 勾选与ie8的兼容
作者:互联网
var isIE=!!window.ActiveXObject;
var isIE8=isIE&&document.documentMode<9;
$('#checkAll').on("click", function () {
if (this.checked) {
staffOrgIdList = [];
$(this).prop("checked",true);
if(isIE8){
$(this).next().css("background-position","0px -40px");
}
$("input[name='ckbs']").each(function () {
$(this).prop("checked",true);
$(this).parent().parent().addClass('selected');
staffOrgIdList.push($(this).attr("val"));
});
} else {
$(this).removeAttr('checked');
if(isIE8){
$(this).next().css("background-position","0px 0px");
}
$("input[name='ckbs']").each(function () {
$(this).removeAttr('checked');
$(this).parent().parent().removeClass('selected');
staffOrgIdList = [];
});
}
})
标签:ie8,ActiveXObject,lulu,window,isIE,ui,var 来源: https://www.cnblogs.com/xixicf/p/11613391.html