Skip to content

Instantly share code, notes, and snippets.

@legenderrys
Created September 24, 2013 22:31
Show Gist options
  • Save legenderrys/6692242 to your computer and use it in GitHub Desktop.
Save legenderrys/6692242 to your computer and use it in GitHub Desktop.
Using Barrel's MixitUp jquery filter to automatically filter based on url hash
$('#grid').mixitup({
onMixLoad: function(){
var hash = window.location.hash;
var noHash=hash.replace("#","");
if(hash){
$('#grid').mixitup('filter', noHash);
}
}
});
@Artisticpuppy
Copy link

Where do you put this inside of your site? I'm trying to place it inside of a wordpress website. I tried putting it in the .js file and my function files neither worked. Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment