Change hash when filtering, select first after filter
This commit is contained in:
parent
2dc740a27f
commit
2d30417f38
11
index.html
11
index.html
@ -219,17 +219,16 @@
|
|||||||
})
|
})
|
||||||
$('#theNumberofSpots').html(theNumberofSpots)
|
$('#theNumberofSpots').html(theNumberofSpots)
|
||||||
|
|
||||||
filterOnHash()
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onhashchange = filterOnHash
|
|
||||||
|
|
||||||
function filterOnHash() {
|
|
||||||
if(window.location.hash) {
|
if(window.location.hash) {
|
||||||
$('#tableFilter').val(window.location.hash.substring(1)).keyup()
|
$('#tableFilter').val(window.location.hash.substring(1)).keyup()
|
||||||
$('.spotRow').first().click()
|
$('.spotRow').first().click()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(document).on('keyup', '#tableFilter', function() {
|
||||||
|
window.location.hash = $(this).val()
|
||||||
|
$('.spotRow').first().click()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user