if we want to use label pic to cover input checkbox.
we use to define of z-index the hierarchy in firefox and chrome,but IE cannot , we use IE practical CSS Paramter to set transparency, but firefox and chrome cannot use.
such as:
.custom-checkbox input {
filter:alpha(opacity=0);//define for IE
display: block;//input checkbox show
z-index: -1;//define for firefox and chrome
}
JSP
<div class="cM-accCheckbox">
<input type="checkbox" name="mailNumbers" id="c_1" value="MM4342">
<label class="oddrow" for="c_1"> </label>
</div>
js
function jpcMessageCtr_inboxCheckEvent(_this) {
var checkAll = true;
if (_this.checked) {
$(_this).next("label").addClass("checked");
$(_this).attr("checked", true);
} else {
if($(_this).next("label").hasClass("checked")){
$(_this).next("label").removeClass("checked");
}
$(_this).attr("checked", false);
}
$(".cA-msgctr-displayPagianationMessageContent").find(":checkbox[name='mailNumbers']").each(function() {
if (this.checked) {
} else {
checkAll = false;
}
});
if (checkAll) {
$(".cA-msgctr-displayPagianationMessageContent").find("#CHKBOXALL-1").attr("checked", true);
$(".cA-msgctr-displayPagianationMessageContent").find("#CHKBOXALL-1").next("label").addClass("checked");
} else {
$(".cA-msgctr-displayPagianationMessageContent").find("#CHKBOXALL-1").attr("checked", false);
if($(".cA-msgctr-displayPagianationMessageContent").find("#CHKBOXALL-1").next("label").hasClass("checked")){
$(".cA-msgctr-displayPagianationMessageContent").find("#CHKBOXALL-1").next("label").removeClass("checked");
}
}
}
function jpcMessageCtr_inboxCheckEventBind() {
$(".cA-msgctr-displayPagianationMessageContent").find(":checkbox[name='mailNumbers']").each(
function(index) {
var self = this;
$(this).bind("click", function() {
jpcMessageCtr_inboxCheckEvent(self);
});
});
we use to define of z-index the hierarchy in firefox and chrome,but IE cannot , we use IE practical CSS Paramter to set transparency, but firefox and chrome cannot use.
such as:
.custom-checkbox input {
filter:alpha(opacity=0);//define for IE
display: block;//input checkbox show
z-index: -1;//define for firefox and chrome
}
JSP
<div class="cM-accCheckbox">
<input type="checkbox" name="mailNumbers" id="c_1" value="MM4342">
<label class="oddrow" for="c_1"> </label>
</div>
js
function jpcMessageCtr_inboxCheckEvent(_this) {
var checkAll = true;
if (_this.checked) {
$(_this).next("label").addClass("checked");
$(_this).attr("checked", true);
} else {
if($(_this).next("label").hasClass("checked")){
$(_this).next("label").removeClass("checked");
}
$(_this).attr("checked", false);
}
$(".cA-msgctr-displayPagianationMessageContent").find(":checkbox[name='mailNumbers']").each(function() {
if (this.checked) {
} else {
checkAll = false;
}
});
if (checkAll) {
$(".cA-msgctr-displayPagianationMessageContent").find("#CHKBOXALL-1").attr("checked", true);
$(".cA-msgctr-displayPagianationMessageContent").find("#CHKBOXALL-1").next("label").addClass("checked");
} else {
$(".cA-msgctr-displayPagianationMessageContent").find("#CHKBOXALL-1").attr("checked", false);
if($(".cA-msgctr-displayPagianationMessageContent").find("#CHKBOXALL-1").next("label").hasClass("checked")){
$(".cA-msgctr-displayPagianationMessageContent").find("#CHKBOXALL-1").next("label").removeClass("checked");
}
}
}
function jpcMessageCtr_inboxCheckEventBind() {
$(".cA-msgctr-displayPagianationMessageContent").find(":checkbox[name='mailNumbers']").each(
function(index) {
var self = this;
$(this).bind("click", function() {
jpcMessageCtr_inboxCheckEvent(self);
});
});