Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

114
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!