Skip to content

Instantly share code, notes, and snippets.

@dcnb dcnb/filterit.js
Created Jun 8, 2015

Embed
What would you like to do?
Filterit Function for Isotope and Latah County Oral HIstory index page
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
You can’t perform that action at this time.