This commit is contained in:
Aevann1 2022-03-06 00:05:09 +02:00
parent 079456f16d
commit eca021c239

View file

@ -11,12 +11,12 @@ function sort_table(n) {
x = rows[i].getElementsByTagName("TD")[n];
y = rows[i + 1].getElementsByTagName("TD")[n];
if (dir == "asc") {
if (x.innerHTML.toLowerCase() > y.innerHTML.toLowerCase()) {
if (parseInt(x.innerHTML) > parseInt(y.innerHTML)) {
shouldSwitch = true;
break;
}
} else if (dir == "desc") {
if (x.innerHTML.toLowerCase() < y.innerHTML.toLowerCase()) {
if (parseInt(x.innerHTML) < parseInt(y.innerHTML)) {
shouldSwitch = true;
break;
}