Home > Article > Web Front-end > Using jquery.sortElements to implement table sorting_javascript skills
The table sorting function needs to be implemented in the project.
There are many solutions online, many of which are based on jQuery.
jquery.tablesorter, size 17KB, but its homepage has some compatibility issues under IE10.
DataTables, 75KB in size, powerful, with paging, search and other functions.
There is also a plug-in called sortElements, which is very small, only 3KB, has good compatibility, and has 818 stars on Github.
Finally I chose to use sortElements, the implementation is very simple:
1. Introduce jQuery
Facility name | Phone # | City | Speciality |
---|---|---|---|
CCC | 00001111 | ;GGG