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

107
Visualizações
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 Respostas
Responde à pergunta

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 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