Fossil SCM
update the documentation in quickfilter.js
Commit
81b4fd259b6238380cefc6016ef47f02e3bd9f4b9b5ad6ed40fa685922f61d7c
Parent
8cbcf36be3d7b7c…
1 file changed
+9
-1
+9
-1
| --- src/quickfilter.js | ||
| +++ src/quickfilter.js | ||
| @@ -1,9 +1,17 @@ | ||
| 1 | 1 | /* Javascript code that will enable quick filtering of items in tables. |
| 2 | 2 | ** |
| 3 | 3 | ** Add an input field with the id 'quickfilter' as follows: |
| 4 | -** <input type="text" id="quickfilter" placeholder="filter list..."> | |
| 4 | +** <input type="search" id="quickfilter" style="display: none" | |
| 5 | +** placeholder="filter list..."> | |
| 6 | +** The id on the input-field is important for the script. The input type | |
| 7 | +** can be text or search, with search some browsers add functionality to | |
| 8 | +** clear the field. The display: none is added to hide it from users that | |
| 9 | +** haven't enabled Javascript, as the script to make it visible is never | |
| 10 | +** executed. This is because without Javascript this input-field would be | |
| 11 | +** functionless. | |
| 12 | +** | |
| 5 | 13 | ** Mark the table with the filter items with the class 'filterable'. |
| 6 | 14 | ** The table is expected to have a tbody around the rows that are |
| 7 | 15 | ** filtered (to avoid filtering the header). |
| 8 | 16 | ** |
| 9 | 17 | ** The user can type to filter the table for elements matching the typed text. |
| 10 | 18 |
| --- src/quickfilter.js | |
| +++ src/quickfilter.js | |
| @@ -1,9 +1,17 @@ | |
| 1 | /* Javascript code that will enable quick filtering of items in tables. |
| 2 | ** |
| 3 | ** Add an input field with the id 'quickfilter' as follows: |
| 4 | ** <input type="text" id="quickfilter" placeholder="filter list..."> |
| 5 | ** Mark the table with the filter items with the class 'filterable'. |
| 6 | ** The table is expected to have a tbody around the rows that are |
| 7 | ** filtered (to avoid filtering the header). |
| 8 | ** |
| 9 | ** The user can type to filter the table for elements matching the typed text. |
| 10 |
| --- src/quickfilter.js | |
| +++ src/quickfilter.js | |
| @@ -1,9 +1,17 @@ | |
| 1 | /* Javascript code that will enable quick filtering of items in tables. |
| 2 | ** |
| 3 | ** Add an input field with the id 'quickfilter' as follows: |
| 4 | ** <input type="search" id="quickfilter" style="display: none" |
| 5 | ** placeholder="filter list..."> |
| 6 | ** The id on the input-field is important for the script. The input type |
| 7 | ** can be text or search, with search some browsers add functionality to |
| 8 | ** clear the field. The display: none is added to hide it from users that |
| 9 | ** haven't enabled Javascript, as the script to make it visible is never |
| 10 | ** executed. This is because without Javascript this input-field would be |
| 11 | ** functionless. |
| 12 | ** |
| 13 | ** Mark the table with the filter items with the class 'filterable'. |
| 14 | ** The table is expected to have a tbody around the rows that are |
| 15 | ** filtered (to avoid filtering the header). |
| 16 | ** |
| 17 | ** The user can type to filter the table for elements matching the typed text. |
| 18 |