SóProvas


ID
1757170
Banca
FCC
Órgão
TRE-PB
Ano
2015
Provas
Disciplina
Programação
Assuntos

Considere a página HTML abaixo, contida na mesma pasta da biblioteca jquery-2.1.4.min:

<!DOCTYPE html>
<html>
    <head>
        <script type="text/javascript" src="jquery-2.1.4.min">
        </script>
        <script type="text/javascript">
            $(document).ready(function() {
               $('button').click(function() {
                  $('..I.... ').css('background', 'red');
               });
           });
       </script>
    </head>
       <body>
               <button type="button">Aplicar</button>
               <table border="1">
                     <tr><td>A</td></tr>
                     <tr><td>B</td></tr>
                     <tr><td>C</td></tr>
                     <tr><td>D</td></tr>
               </table>
       </body>
</html>

Ao clicar no botão Aplicar, para que as letras B e D, contidas na tabela, fiquem com fundo na cor vermelha, deve-se preencher a lacuna I com:

Alternativas
Comentários
  • Odd --> Índice ímpar

    Even --> Índice par

    The :odd selector selects each element with an odd index number (like: 1, 3, 5, etc.).

    Use the :even selector to select elements with even index numbers.

    The index numbers start at 0.

    Fonte: https://www.w3schools.com/jquery/sel_odd.asp

  • Me confundi, porque o índice 0 não é par nem ímpar, por isso não recebe o efeito rsrsrs.

  • Zero é par. Zero só não é positivo nem negativo.

  • está depreciado esse seletor exclusivo jQuery, conforme https://api.jquery.com/category/selectors/ basic-filter-selectors/