Created
December 5, 2013 21:39
-
-
Save onyxfish/7814393 to your computer and use it in GitHub Desktop.
The key fragment for integrating isotope and unveil gracefully.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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