Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

146
Visualizações
shorted Jquery by using each() function

How can i shorted this jquery by using each() function? or have another method to shorted this jquery?

            $("div.body-t-option-1").hover(function() {
                $(".body-t-img-2,.body-t-img-3,.body-t-img-4").hide();
                $(".body-t-img-1").show();
                $(".body-t-img-1").addClass('animated fadeInLeft');
            });

            $("div.body-t-option-2").hover(function() {
                $(".body-t-img-1,.body-t-img-3,.body-t-img-4").hide();
                $(".body-t-img-2").show();
                $(".body-t-img-2").addClass('animated fadeInLeft');
            });

            $(".body-t-option-3").hover(function() {
                $(".body-t-img-1,.body-t-img-2,.body-t-img-4").hide();
                $(".body-t-img-3").show();
                $(".body-t-img-3").addClass('animated fadeInLeft');
            });

            $(".body-t-option-4").hover(function() {
                $(".body-t-img-1,.body-t-img-2,.body-t-img-3").hide();
                $(".body-t-img-4").show();
                $(".body-t-img-4").addClass('animated fadeInLeft');
            });

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

how are u? suggestion, currently it is recommended to use the events as follows

$(document).on('hover', 'div.body-t-option-1', () => {
    //code...
});

$(document).on('click', '#something', () => {
    //code...
});

now, regarding the question, let me suggest that you reformulate it by adding more information for example with an html template in order to understand your desired output

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda