Answers for "html sortable tables"

1

sort table in html

<script src="https://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>

<table class="sortable">
  <tr>
    <th>Name</th>
    <th>Address</th>
    <th>Sales Person</th>
  </tr>

  <tr class="item">
    <td>user:0001</td>
    <td>UK</td>
    <td>Melissa</td>
  </tr>
  <tr class="item">
    <td>user:0002</td>
    <td>France</td>
    <td>Justin</td>
  </tr>
  <tr class="item">
    <td>user:0003</td>
    <td>San Francisco</td>
    <td>Judy</td>
  </tr>
  <tr class="item">
    <td>user:0004</td>
    <td>Canada</td>
    <td>Skipper</td>
  </tr>
  <tr class="item">
    <td>user:0005</td>
    <td>Christchurch</td>
    <td>Alex</td>
  </tr>

</table>
 Run code snippet
Posted by: Guest on November-16-2021
0

html table with sortable columns

<table class="sortable">
 <thead>
   <tr>
     <th>Athlete</th>
     <th>Age</th>
     <th>Country</th>
     <th>Gold Medals</th>
  </tr>
 </thead>
 <tbody>
   <tr>
    <td>David Boudia</td>...
Posted by: Guest on August-12-2021

Browse Popular Code Answers by Language