about summary refs log tree commit diff
path: root/laravel/public
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@gmail.com>2019-01-17 14:44:25 -0500
committerZach DeCook <zachdecook@gmail.com>2019-01-17 14:44:25 -0500
commit0f15c4810b72dfde7c6c4c039e27a71e2bc6dd31 (patch)
tree2bd6391136d2426c0743cb6265edbd195b811f6a /laravel/public
parent39ff0d501208c87b14867ebe7811a480aeebbff6 (diff)
downloadprosongsa-0f15c4810b72dfde7c6c4c039e27a71e2bc6dd31.tar.gz
* Home Page: Add filter
Diffstat (limited to 'laravel/public')
-rw-r--r--laravel/public/js/toc-filter.js18
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