Skip to content

Instantly share code, notes, and snippets.

@dcnb
Created June 8, 2015 21:26
Show Gist options
  • Save dcnb/d22a8453c28d141129ec to your computer and use it in GitHub Desktop.
Save dcnb/d22a8453c28d141129ec to your computer and use it in GitHub Desktop.
Hashtag filter for Isotope and Latah County Oral History Collection index page
ar hashfilter = location.hash.substr(1).replace("%20"," ").replace("%20"," ").replace("%20"," ").replace("%20"," ");
var hashfilterclass = "." + location.hash.substr(1).replace("%20","-").replace("%20","-").replace("%20","-").replace(" ","-").replace(" ","-").replace(" ","-");
if (hashfilter == ''){
$(document).ready(function()
{ $("#quicksearch").focus();});}
else {
$(document).ready(function() {
$("#quicksearch").focus();
$("#quicksearch").val('');
$('#quicksearch').val($('#quicksearch').val() + hashfilter);
$('#quicksearch').keyup();
$(hashfilterclass).addClass('selectfilter');
$('.introparagraphs').animate({
opacity: 0.25,
left: "+=50",
height: "hide"
}, 300, function() {
// Animation complete.
});
$('.intropar').show();
});}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment