Created
September 24, 2013 22:31
-
-
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
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
$('#grid').mixitup({ | |
onMixLoad: function(){ | |
var hash = window.location.hash; | |
var noHash=hash.replace("#",""); | |
if(hash){ | |
$('#grid').mixitup('filter', noHash); | |
} | |
} | |
}); |
You're awesome. Cheers.
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
This works perfectly! Thanks!