Skip to content

Instantly share code, notes, and snippets.

@glennyboy glennyboy/Isotope filter by URL Hash Secret
Last active Jul 24, 2019

Embed
What would you like to do?
Isotope filter by URL Hash
<script>
// Isotope filter by URL Hash
jQuery(document).ready( function($) {
// Store # parameter and add "." before hash
var hashID = "." + window.location.hash.substring(1);
// Set Isotope Container
var $container = $('.container');
$container.isotope({
itemSelector: ".item",
filter: hashID, // the variable filter
});
});
</script>
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.