Hide / Show function does not work in IE 8

1

I have a JavaScript that does the function of grouping items in a table.

For example I click on it and it expands bringing more values of this item. The problem is that IE 8 does not work. In Chrome and Mozilla the function works normally.

function ocultarColunasNaoAgrupadas(){
    $('#tabelaPainelCnab tbody tr td').each(function() {
        var idCell = $(this).attr('name');

        if (idCell == 'identQuebraMes') {
            var cellTextMes = ''+ $(this).html();
        }     
        if (idCell == 'identQuebraCarteira') {
            if ($(this).html().length > 0 ) {
                $(this).closest('tr').attr('agrupador', 'N');
                //$(this).closest('tr').slideToggle(300)
                $(this).closest('tr').hide();
            } else { 
                $(this).closest('tr').hide();
                $(this).closest('tr').attr('agrupador', 'S');
                $(this).closest('tr').attr('class', 'header');
                $(this).closest('tr').show();
            }  
        }
    });
}
    
asked by anonymous 24.03.2017 / 23:55

1 answer

1

Current jQuery does not support IE 8

Browsers supported

Desktop

Chrome: (Current - 1) and Current Edge: (Current - 1) and Current Firefox: (Current - 1) and Current Internet Explorer: 9+ Safari: (Current - 1) and Current
Opera: Current

Mobile

Browser Stock on Android 4.0+
Safari on iOS 7 +

Solution

If you need support for older browsers such as Internet Explorer 6-8, Opera 12.1x, or Safari 5.1+, use jQuery 1.12

Conditional comments

 <!--[if IE 8]>
<script src="js/jQuery-1.12.js"></script>
<![endif]-->

source: link

    
26.03.2017 / 17:00