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

166
Views
Jquery datatables show only selected

I have a simple HTML table, where first "td" is customized to be an ID input checkbox :

<table class="table" id="mytable">
    <thead>
        <tr>
            <th scope="col">Col1</th>
            <th scope="col">Col2</th>
            <th scope="col">Col3</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><input type=checkbox name="id-1" value=1></td>
            <td class="id">ID</td>
            <td class="name>NAME</td>
        </tr>
        <tr>
            <td><input type=checkbox name="id-2" value=2></td>
            <td class="id">ID</td>
            <td class="name>NAME</td>
        </tr> 
    ....... A lot of more rows, some already checked ..........
    </tbody>
</table>

Then I am using Jquery Datatable to "enhance" the table to be a Datatable :

$('#mytable').DataTable();

Since some values could be already checked during table rendering, I'm trying to figure out the most effective way to add a "show only selected/show all" button that filters the datatable and only show checked checkbox.

Is there a way to do it directly with Datatable without involving external code or what's the best way to achieve this?

I read about a legacy extension named "TableTools" that should ease this, but it seems being deprecated from a long time.

about 4 years ago · Santiago Trujillo
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!