Created
June 8, 2015 21:25
-
-
Save dcnb/0b4a7dab6cbcabb0b0c1 to your computer and use it in GitHub Desktop.
Filterit Function for Isotope and Latah County Oral HIstory index page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var filterit = function() { | |
$('#quicksearch').val(''); | |
$(this).addClass('selectfilter'); | |
$('a.vocab').not(this).removeClass('selectfilter'); | |
var filterValue = $(this).attr('data-filter'); | |
var filterClass = $(this).attr('data-filter').replace(" ","-").replace(" ","-"); | |
$('#quicksearch').val($('#quicksearch').val() + filterValue); | |
$('#quicksearch').keyup(); | |
window.location.hash = filterValue; | |
var filterValueclass = "." + filterClass; | |
$(filterValueclass).addClass('selectfilter'); }; | |
$('a.vocab').click(filterit); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment