Skip to content

Instantly share code, notes, and snippets.

@delowardev
Created September 28, 2017 08:03
Show Gist options
  • Save delowardev/08bfad66c851b812ed90b77e09754e57 to your computer and use it in GitHub Desktop.
Save delowardev/08bfad66c851b812ed90b77e09754e57 to your computer and use it in GitHub Desktop.
flat.portfolio_isotope = $('.portfolio-isotope');
flat.portfolio_menu = $('.isotope-menu li');
flat.portfolio_isotope.isotope({
itemSelector: '.single-portfolio',
layoutMode: 'fitRows'
});
flat.portfolio_menu.on('click', function () {
flat.portfolio_menu.removeClass("active");
$(this).addClass("active");
var selector = $(this).attr('data-filter');
flat.portfolio_isotope.isotope({
filter: selector,
animationOptions: {
duration: 750,
easing: 'linear',
queue: false,
}
});
return false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment