I have an onChange event for a checkbox which fires a function that toggles the Visibility of some TRs. My problem is this code only works in firefox. I want it to work for ie8.
function toggleVisibility() {
if ($("#ctl00_PageContent_chkVisibility").is(':checked')) {
$('#ctl00_PageContent_freight_rate_column_chaair tr').each(function(i, val) { // Loop through rows in grid
if (i > 9 & i < 28) {
$('#ctl00_PageContent_freight_rate_column_chaair_r' + i).hide();
};
});
}
else {
$('#ctl00_PageContent_freight_rate_column_chaair tr').each(function(i, val) { // Loop through rows in grid
if (i > 9 & i < 28) {
$('#ctl00_PageContent_freight_rate_column_chaair_r' + i).show();
};
});
};
};
Does anyone know a better way of doing this?
Thanks