multi language support
support for small devices
This commit is contained in:
21
assets/searchtable.js
Normal file
21
assets/searchtable.js
Normal file
@@ -0,0 +1,21 @@
|
||||
function searchTable(tableId, searchField) {
|
||||
var input, filter, table, tr, td, i, j, txtValue;
|
||||
input = searchField;
|
||||
filter = input.value.toUpperCase();
|
||||
table = document.getElementById(tableId);
|
||||
tr = table.getElementsByTagName("tr");
|
||||
for (i = 0; i < tr.length; i++) {
|
||||
td = tr[i].getElementsByTagName("td");
|
||||
for (j = 0; j < td.length; j++) {
|
||||
if (td[j]) {
|
||||
txtValue = td[j].textContent || td[j].innerText;
|
||||
if (txtValue.toUpperCase().indexOf(filter) > -1) {
|
||||
tr[i].style.display = "";
|
||||
break;
|
||||
} else {
|
||||
tr[i].style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user