Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

144
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda