Merge pull request #30 from muan/filter

Hash filter
This commit is contained in:
Jessica Lord 2015-04-03 10:45:34 -07:00
commit 8202314e7e
1 changed files with 10 additions and 0 deletions

View File

@ -216,7 +216,17 @@
numberOfSpots: gData.length
})
$('#theNumberofSpots').html(theNumberofSpots)
if(window.location.hash) {
$('#tableFilter').val(window.location.hash.substring(1)).keyup()
$('.spotRow').first().click()
}
}
$(document).on('keyup', '#tableFilter', function() {
window.location.hash = $(this).val()
$('.spotRow').first().click()
})
</script>
</body>
</html>