Code works in Firefox and Chrome but not in jsfiddle or IE 11?

Code works in Firefox and Chrome but not in jsfiddle or IE 11?

The code below works in chrome and firefox but not in jsfiddle or IE 11.  I'm not understanding why and have been able to correct it.  I have a table with checkboxes in a column and want to hide/toggle rows that are unchecked.  I'm using localstorage so revisiting the page remembers.  thanks for any suggestions.   If I leave all checkboxes blank it closes all rows appropriately but check just one box and bam, it does nothing... I think it might be this line:

 if (arr1.indexOf(attrText2)==-1 && $(this).closest("img [alt*='.xml']")!=-1 ){

or maybe

$(this).closest('tr').toggle() ;


 // UPDATE LOCAL STORAGE WITH INFO  EACH TIME A CHECKBOX IS CHECKED, THEN USE IT TO HIDE UNCHECKED TABLE ROWS
    

 $("#filter2").click(function () {
// var timex=window.location.pathname;
alert("path= "+timex);
 var arr = [];
   // alert("foo");
localStorage.removeItem(timex);
$("input:checkbox:checked").each(function () {
arr.push($(this).parent().parent().parent().find('a').text());
});
        localStorage.setItem(timex, arr);
        //alert("ls= "+localStorage.getItem(timex));
        var arr1 = localStorage.getItem(timex).split(',');
//alert("arr1= "+arr1);
              $(".s4-itm-cbx").each(function () {
 
          var attrText2 = ($(this).parent().parent().parent().find('a').text());
                  alert("attrTest2= "+attrText2);
  if (arr1.indexOf(attrText2)==-1 && $(this).closest("img [alt*='.xml']")!=-1 ){
               alert("pEp");
$(this).closest('tr').toggle() ;
}
           });//END EACH FUNCTION
        });//END .CLICK FUNTION