I am trying to understand how to use Combination filters with Jquery BBQ Hash History.
What I want to do is have the user filter by Logos, Identity or Branding. If the user clicks Logos, I want them to then be able to subfilter by "Non-Profit, Education, Retail" etc. I know combination filters work fine without the jquery BBQ code implemented, but I would like to do both.
$optionSets.find('.filter-main a').click(function(){
var $this = $(this);
// don't proceed if already selected
if ( $this.hasClass('selected') ) {
return;
}
changeSelectedLink( $this );
// get href attr, remove leading #
var href = $this.attr('href').replace( /^#/, '' ),
// convert href into object
// i.e. 'filter=.inner-transition' -> { filter: '.inner-transition' }
option = $.deparam( href, true );
// apply new option to previous
$.extend( isotopeOptions, option );
// set hash, triggers hashchange on window
$.bbq.pushState( isotopeOptions );
isOptionLinkClicked = true;
return false;
});
See http://support.metafizzy.co/2011/isotope-combo-filters-hash-links.html