Skip to content

Instantly share code, notes, and snippets.

@onyxfish
Created December 5, 2013 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onyxfish/7814393 to your computer and use it in GitHub Desktop.
Save onyxfish/7814393 to your computer and use it in GitHub Desktop.
The key fragment for integrating isotope and unveil gracefully.
// Never relayout the grid more than twice a second
var relayout = _.throttle(function() {
$books_grid.isotope('reLayout');
}, 500);
/*
* Begin unveiling visible books in the grid.
*/
var unveil_grid = function() {
$books_grid.find('img').unveil(800, function() {
$(this).load(function() {
relayout();
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment