Biblioteca de ordenación de tabla mínima-sorTable. js
| Autor: | beatdjam |
|---|---|
| Views Total: | 3,858 |
| Sitio oficial: | Ir a la web |
| Actualizado: | November 12, 2016 |
| Licencia: | MIT |
Vista prévia
Descripción
sorTable. js es una biblioteca de JavaScript extremadamente ligera que se utiliza para ordenar las filas de la tabla por alfabeto y número sin ninguna dependencia.
Funcionamiento
Agregue los archivos JS y CSS de la sorTable a la página HTML.
<link rel="stylesheet" href="css/sorTable.css"> <script src="js/sorTable.js"></script>
Agregue la clase CSS ' ordenable ' a su tabla HTML existente y done. Tenga en cuenta que la tabla HTML debe tener elementos ' THEAD ' y ' tbody '.
<table class="sortable"> <thead> <tr> <th>No</th> <th>Content1</th> <th>Content2</th> </tr> </thead> <tbody> <tr> <th>1</th> <td>Alpha</td> <td>Charlie</td> </tr> <tr> <th>2</th> <td>Bravo</td> <td>Duff</td> </tr> <tr> <th>3</th> <td>Charlie</td> <td>Apple</td> </tr> <tr> <th>4</th> <td>Delta</td> <td>Butter</td> </tr> </tbody> </table>
Eso es todo. Haga clic en el encabezado de la tabla para ordenar las filas de la tabla.





