Skip to content

Instantly share code, notes, and snippets.

@hyperking
Created September 24, 2013 22:31
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hyperking/6692242 to your computer and use it in GitHub Desktop.
Save hyperking/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);
}
}
});
@jeffuu
Copy link

jeffuu commented Sep 26, 2013

This works perfectly! Thanks!

@Klayemore
Copy link

You're awesome. Cheers.

@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