I have this internal application that I made. It works fine in IE9 (and all the other browsers) but some of the internal users are still on IE8.
The line causing the problem is:
var thisClass = $thisElement.attributes.class.value;
I get the error message is "SCRIPT1010: Expected identifier" and the marker is just before the c in class.
Here is the code:
$(document).on('click', function(){
var $this = $(this);
var $thisElement = $this.context.activeElement;
if ($thisElement != null && $thisElement.attributes.type != null && $thisElement.attributes.type.value == "checkbox" ){
var thisClass = $thisElement.attributes.class.value;
var thisValue = $thisElement.value;
if (thisValue == "All"){
if($thisElement.checked){
$('input[class="'+thisClass+'"]').each(function(i){
var checkboxValue = $(this).val();
$("#"+thisClass+checkboxValue).prop('checked',true);
});
}else {
$('input[class="'+thisClass+'"]').each(function(i){
var checkboxValue = $(this).val();
$("#"+thisClass+checkboxValue).prop('checked',false);
});
}
}else // since the val is not = all we want to uncheck the all box if any of the bottom boxes is unchecked
if (!$thisElement.checked){
$("#"+thisClass+"All").prop('checked',false);
}
cnse.checkTheCheckboxes();
}else{
return;
};// end if it is a checkbox
});