Introduction
Introduction Statistics Contact Development Disclaimer Help
datatable: ajax example: use lowercase for filtering - jscancer - Javascript cr…
git clone git://git.codemadness.org/jscancer
Log
Files
Refs
README
LICENSE
---
commit df4221b25dcd1c6a3ca0c48e002a8ac30b724820
parent 118c93a8de2037ab3ec38e1bf17c6a3fc00cb01b
Author: Hiltjo Posthuma <[email protected]>
Date: Thu, 17 Aug 2017 19:07:24 +0200
datatable: ajax example: use lowercase for filtering
Diffstat:
M datatable/example-ajax.html | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/datatable/example-ajax.html b/datatable/example-ajax.html
@@ -36,14 +36,13 @@ function datatable_load_data(d, data) {
var tr = document.createElement("tr");
for (var j = 0; j < data[i].length; j++) {
var td = document.createElement("td"), v, vd, vs;
- // array[2] with [actual value, "displaystring" ]
- // or value.
+ // array with [ actual value case-insensitive, "displa…
if (data[i][j].constructor === Array) {
v = data[i][j][0];
vd = data[i][j][1];
vs = String(v);
td.setAttribute("data-value", vs);
- fv.push([ vs, vd.toLowerCase() ]);
+ fv.push([ vs.toLowerCase(), vd.toLowerCase() ]…
} else {
v = data[i][j];
vd = String(v);
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.