Skip to content

kraevskiy/sorting-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Function sortTable(){};

Function for sorting table

DEMO

Basic markup HTML

<table>
    <thead>
        <tr>
            <th data-type="number">Rank</th>
            <th data-type="string">ID</th>
            ...
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>1</td>
            <td>btc-bitcoin</td>
            ...
        </tr>
        ...
    </tbody>
</table>

JS Code for run

sortTable({option});

options:

{
    selector: '.sortTable', // *required
    clear: '.clearSort' // default: false
}
  • selector - selector your table *required
  • clear - selector your button for sorting clear *not required (defaul: false);

For start

  • copy html
  • copy function
  • call function in you js file

About

Function for sorting table

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published