I am using isotope, here’s the jsfiddle: http://jsfiddle.net/desandro/DA3wF/
Or, alternatively, a demo I have set up: http://nerdi.net/isotope-test.html
There’s an option filter: selector
How could I pass a filter, ex: index.html#green that on page load, would filter to the .green class? is this possible?
This is an
if/thenstatement that checks to see if the current hash is an empty string. If it is thenfilterwill be set todefaultotherwise it will be set to thewindow.location.hashvalue (minus the#).A URL like this,
index.html, will result infilterbeing set todefaultand a URL like this,index.html#my-selector, will result infilterbeing set to.my-selector.Update
The reason your code isn’t working doesn’t actually have anything to do with my code, but here is an updated version of your code that I tested on your site: