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

112
Vistas
Footable expand only 1 row at a time

Im using Footable for my data. here's an official example. With beakpoints i can hide some data and expand it when necessary... But i want to expand one row at a time and close the other expanded rows.

With Footable i figured out i can access the event of expanding a row like:

 $("#footableID").on("expand.ft.row", function (e, ft, row) {
    var rows=$('#footableID tbody').children("tr");
    // hide expanded data
});

but i cant find a way to hide the expanded rows... I tried removing the data-expanded="true" attribute to the rows,but that dosnt seems to work... also, im not sure if children is the best way to access the rows

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

ok, so "find" is a better way to acces row childs, and when you got a expanded row, you have to trigger a click to close it. ...if i understand correctly expand.ft.row occurres before it is actually expanded

$("#tabla").on("expand.ft.row", function (e, ft, row) {
    $('#tabla tbody').find('tr').each(function(){
        if (this.getAttribute("data-expanded")){
            this.click(); 
        }
    })
});
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