diff options
| author | Zach DeCook <zachdecook@gmail.com> | 2019-01-17 14:44:25 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@gmail.com> | 2019-01-17 14:44:25 -0500 |
| commit | 0f15c4810b72dfde7c6c4c039e27a71e2bc6dd31 (patch) | |
| tree | 2bd6391136d2426c0743cb6265edbd195b811f6a /laravel/public/js | |
| parent | 39ff0d501208c87b14867ebe7811a480aeebbff6 (diff) | |
| download | prosongsa-0f15c4810b72dfde7c6c4c039e27a71e2bc6dd31.tar.gz | |
* Home Page: Add filter
Diffstat (limited to 'laravel/public/js')
| -rw-r--r-- | laravel/public/js/toc-filter.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/laravel/public/js/toc-filter.js b/laravel/public/js/toc-filter.js new file mode 100644 index 0000000..08afa2d --- /dev/null +++ b/laravel/public/js/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 |
