-
Notifications
You must be signed in to change notification settings - Fork 0
main.js
SpencerChang edited this page Aug 12, 2016
·
1 revision
$(function() {
// init Masonry
var
// layout Isotope after each image loads
$('.grid,.food_grid').imagesLoaded().progress(function() {
$('.grid,.food_grid').masonry();
});
var $food_grid = $('.food_grid').isotope({
itemSelector: '.grid-item',
layoutMode: 'fitRows'
});
// init Isotope
var $food_grid = $('.food_grid').isotope({
// options
});
// filter items on button click
$('.filter-button-group').on( 'click', 'button', function() {
var filterValue = $(this).attr('data-filter');
$food_grid.isotope({ filter: filterValue });
});
});