diff options
| author | Zach DeCook <zachdecook@gmail.com> | 2018-02-13 15:11:34 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@gmail.com> | 2018-02-13 15:11:34 -0500 |
| commit | df6ffc3da9d202aa1dd5bcfb363e938871681f44 (patch) | |
| tree | 20c005d9ce20940b0f2cbab0c703712e9f73c496 /toc-filter.js | |
| download | prosongsa-df6ffc3da9d202aa1dd5bcfb363e938871681f44.tar.gz | |
* Tabs Project: Initial Commit
Diffstat (limited to 'toc-filter.js')
| -rw-r--r-- | toc-filter.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/toc-filter.js b/toc-filter.js new file mode 100644 index 0000000..08afa2d --- /dev/null +++ b/toc-filter.js @@ -0,0 +1,18 @@ +$(function(){ + $("#toc-filter").bind("change paste keyup", toc_filter); +}); + +function toc_filter( event ) +{ + var val = $(this).val().toLowerCase(); + $("#toc li").each(function(){ + if($(this).text().toLowerCase().indexOf(val) == -1) + { + $(this).hide(); + } + else + { + $(this).show(); + } + }); +} \ No newline at end of file |
