Bill-
I tried your method and can't seem to make it work. Are those two lines all that are necessary?
Here is the menu HTML for the link to my isotope filtered page:
<li><a href="entertainment.html">Entertainment</a>
<ul>
<li><a href="entertainment.html#party">Party bands, Show and Tribute bands</a></li>
<li><a href="entertainment.html#classical">Classical, Jazz, and Easy Listening</a></li>
<li><a href="entertainment.html#djs">DJs, Emcees, Variety, and Interactive</a></li>
</ul>
</li>
Here is the code for my filters (IDs not being used here):
<div id="filters">
<ul class="option-set" data-option-key="filter">
<li><a id="f-all" href="#filter" class="selected" data-option-value="*">All</a></li>
<li><a id="f-party" href="#filter" data-option-value=".party">Party Bands</a></li>
<li><a id="f-classical" href="#filter" data-option-value=".classical">Classical, Jazz, and Easy Listening</a></li>
<li><a id="f-djs" href="#filter" data-option-value=".djs">DJs and Emcees</a></li>
</ul>
And here is the script I put at the end of the filtered page:
<script type="text/javascript">
$(document).ready(function() {
var pathname = window.location;
alert(pathname.toString()); //testing purposes
if(pathname.toString().indexOf("party") != -1){
alert('shit went through 9'); //testing purposes
var filterFromQuerystring = 'party'; // getParameterByName('filter');
$('a[data-option-value=".' + filterFromQuerystring + '"]').click();
}
});
I intend to have the page choose a different filter based on what comes after the hashtag in the URL. Is there a smarter way to go about this?