tablefilter
This commit is contained in:
parent
d0576188e0
commit
9297e8d6bc
14
README.md
14
README.md
@ -221,11 +221,23 @@ Heading
|
|||||||
```
|
```
|
||||||
<link href="/cssjs/grid.css" rel="stylesheet">
|
<link href="/cssjs/grid.css" rel="stylesheet">
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
<div class="grid-container">
|
<div class="grid-container">
|
||||||
<section>...</section>
|
<section>...</section>
|
||||||
<section>...</section>
|
<section>...</section>
|
||||||
<section>...</section>
|
<section>...</section>
|
||||||
</div>
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
## tablefilter
|
||||||
|
```
|
||||||
|
<script src="/cssjs/tablefilter.min.js">
|
||||||
|
|
||||||
|
Suche: <input type="text" onkeyup="myFilter()" id="suchstr" />
|
||||||
|
|
||||||
|
<div class="list" id="suchlist">
|
||||||
|
<div class="row">a</row>
|
||||||
|
<div class="row">b</row>
|
||||||
|
<div class="row">c</row>
|
||||||
|
</div>
|
||||||
```
|
```
|
||||||
15
tablefilter.js
Normal file
15
tablefilter.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
function myFilter() {
|
||||||
|
var input, filter, ul, li, a, i, txtValue;
|
||||||
|
input = document.getElementById("suchstr");
|
||||||
|
filter = input.value.toUpperCase();
|
||||||
|
|
||||||
|
li = jQuery("#suchlist .row");
|
||||||
|
for (i = 0; i < li.length; i++) {
|
||||||
|
txtValue = li[i].textContent || li[i].innerText;
|
||||||
|
if (txtValue.toUpperCase().indexOf(filter) > -1) {
|
||||||
|
li[i].style.display = "";
|
||||||
|
} else {
|
||||||
|
li[i].style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
2
tablefilter.min.js
vendored
Normal file
2
tablefilter.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
function myFilter(){var a;var c=document.getElementById("suchstr").value.toUpperCase();var b=jQuery("#suchlist .row");for(a=0;a<b.length;a++){var d=b[a].textContent||b[a].innerText;-1<d.toUpperCase().indexOf(c)?b[a].style.display="":b[a].style.display="none"}};
|
||||||
|
//# sourceMappingURL=tablefilter.min.js.map
|
||||||
8
tablefilter.min.js.map
Normal file
8
tablefilter.min.js.map
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"version":3,
|
||||||
|
"file":"",
|
||||||
|
"lineCount":1,
|
||||||
|
"mappings":"AAAAA,QAASA,SAAQ,EAAG,CAAA,IACYC,CAE9B,KAAAC,EADQC,QAAAC,eAAAC,CAAwB,SAAxBA,CACCC,MAAAC,YAAA,EAET,KAAAC,EAAKC,MAAA,CAAO,gBAAP,CACL,KAAKR,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgBO,CAAAE,OAAhB,CAA2BT,CAAA,EAA3B,CAAgC,CAC9B,IAAAU,EAAWH,CAAA,CAAGP,CAAH,CAAAW,YAAXD,EAAgCH,CAAA,CAAGP,CAAH,CAAAY,UACc,GAA9C,CAAIF,CAAAJ,YAAA,EAAAO,QAAA,CAA+BZ,CAA/B,CAAJ,CACEM,CAAA,CAAGP,CAAH,CAAAc,MAAAC,QADF,CACwB,EADxB,CAGER,CAAA,CAAGP,CAAH,CAAAc,MAAAC,QAHF,CAGwB,MALM,CANd;",
|
||||||
|
"sources":["tablefilter.js"],
|
||||||
|
"names":["myFilter","i","filter","document","getElementById","input","value","toUpperCase","li","jQuery","length","txtValue","textContent","innerText","indexOf","style","display"]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user