From 2dc740a27f3b9a3cff2798c35d2d8b379c2648f3 Mon Sep 17 00:00:00 2001 From: Mu-An Chiou Date: Fri, 3 Apr 2015 13:02:42 +0800 Subject: [PATCH] Add basic hash method --- index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/index.html b/index.html index def31d3..f2ef0cd 100644 --- a/index.html +++ b/index.html @@ -218,6 +218,17 @@ numberOfSpots: gData.length }) $('#theNumberofSpots').html(theNumberofSpots) + + filterOnHash() + } + + window.onhashchange = filterOnHash + + function filterOnHash() { + if(window.location.hash) { + $('#tableFilter').val(window.location.hash.substring(1)).keyup() + $('.spotRow').first().click() + } }