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

120
Vistas
Add first active class styling

I have portfolio gallery where first item is grid 2 rows and 2 columns and right to that is 2 small images.

Portfolio has filter and if I click filter tab it filters out images but first image is small now. I have question How I can add first active item a style.

HTML:

.elementor-portfolio //class where is articles of each portfolio image
article.elementor-active //portfolio item what is active

CSS:

grid-column: 2!important;
grid-row: 2!important;

What I've tried:

jQuery(function($) {
   $(".elementor-portfolio article.elementor-active").first().css({
   'grid-column' : '2!important',
   'grid-row' : '2!important'
});
});

CODE:

<style>
    .active-one {
    grid-column: span 2;
    grid-row: span 2;
}
.active-twothree {
    grid-column: span 1;
    grid-row: span 1;
}

</style>
<script>

jQuery(function($) {
    $(".custom-grid .elementor-portfolio__filters li").click(function(){
    $(".custom-grid .elementor-portfolio .elementor-active").first().addClass("active-one");
    });
    $('.custom-grid .elementor-portfolio .elementor-active:gt(0)').removeClass('active-one');
});
    
</script>
about 4 years ago · Juan Pablo Isaza
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