1

Tenho um JavaScript que faz a função de agrupar itens em uma tabela.

Por exemplo clico nele e ele expande trazendo mais valores desse item. O problema é que no IE 8 não funciona. No Chrome e Mozilla a função funciona normalmente.

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();
            }  
        }
    });
}
4
  • Seria bom especificar qual a versão do IE. Uma formatadinha no código também não faria mal =)
    – Jéf Bueno
    24/03/2017 às 22:58
  • Estou aprendendo a usar o stack , me perdoe os erros, versao do IE 8, obrigado pelas dicas.
    – user61885
    24/03/2017 às 23:07
  • Note que tenho 3 perguntas, responda todas por favor: 1. Ocorre algum erro no console do IE8? 2. Está usando qual versão do jQuery? 3. Tem como postar uma estrutura simplificada da parte HTML?
    – Syzoth
    24/03/2017 às 23:08
  • Boa noite guilherme, não ocorre nehum erro no IE8, Versao Jquery-1.6.2.js, Segue codigo aqui paste.ofcode.org/h7D5652nR2A2ignaCvHG4t
    – user61885
    24/03/2017 às 23:15

1 Resposta 1

1

O jQuery atual não da Suporte ao IE 8

Navegadores suportado

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

Stock browser on Android 4.0+
Safari on iOS 7+

Solução

Se você precisa de suporte a navegadores mais antigos como o Internet Explorer 6-8, Opera 12.1x ou Safari 5.1+, use jQuery 1.12

Comentários condicionais

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

fonte: http://jquery.com/browser-support/

Você deve fazer log-in para responder a esta pergunta.