A Javascript class library for sorting table contents. It is very convenient to use, and you don’t have to call the database every time.
Especially suitable for sorting multi-table queries. With the addition of style.display switching, paging can also be achieved.
Effect demonstration
usage:
1. Add JS
QUOTE:
The following is a quote fragment:
2. Add TABLE. Note: it must have an ID and the class is "sortable"
QUOTE:
OK, that’s it. It’s simple.
If you think it’s too monotonous, add some CSS by yourself. The official CSS for changing HEAD is given.
QUOTE:
The following is a quote:
Here is a quote:
/* Sortable tables */
table.sortable a.sortheader {
background-color:#eee;
color:#666666;
font-weight: bold;
text-decoration: none;
display: block;
}
table.sortable span.sortarrow {
color:black;
text-decoration: none;
}