fds
This commit is contained in:
parent
079456f16d
commit
eca021c239
1 changed files with 2 additions and 2 deletions
|
@ -11,12 +11,12 @@ function sort_table(n) {
|
||||||
x = rows[i].getElementsByTagName("TD")[n];
|
x = rows[i].getElementsByTagName("TD")[n];
|
||||||
y = rows[i + 1].getElementsByTagName("TD")[n];
|
y = rows[i + 1].getElementsByTagName("TD")[n];
|
||||||
if (dir == "asc") {
|
if (dir == "asc") {
|
||||||
if (x.innerHTML.toLowerCase() > y.innerHTML.toLowerCase()) {
|
if (parseInt(x.innerHTML) > parseInt(y.innerHTML)) {
|
||||||
shouldSwitch = true;
|
shouldSwitch = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (dir == "desc") {
|
} else if (dir == "desc") {
|
||||||
if (x.innerHTML.toLowerCase() < y.innerHTML.toLowerCase()) {
|
if (parseInt(x.innerHTML) < parseInt(y.innerHTML)) {
|
||||||
shouldSwitch = true;
|
shouldSwitch = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue