Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(window).load(function() {
- var $container = $('.am-container'),
- $imgs = $container.find('img').hide(),
- totalImgs = $imgs.length,
- cnt = 0;
- $imgs.each(function(i) {
- var $img = $(this);
- $('<img/>').load(function() {
- ++cnt;
- if( cnt === totalImgs ) {
- $imgs.show();
- $container.montage({
- fillLastRow : true,
- alternateHeight : true,
- alternateHeightRange : {
- min : 175,
- max : 275
- },
- margin : 0
- });
- }
- }).attr('src',$img.attr('src'));
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement