Skip to content

Display multiple images with various proportions in rows of equal height and width.

Notifications You must be signed in to change notification settings

olofbjerke/Mason

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mason

=====

Display multiple images with various proportions in rows of equal height and width.

Calling

Calling Mason is done after all images are loaded.

jQuery(window).load(function() {

	$(".masonry").mason();

});	

HTML

<div class="masonry">
	<img src="imagefile">
	<img src="imagefile">
	<img src="imagefile">
	<img src="imagefile">
</div>

example

jQuery(window).load(function() {
	$(".masonry").mason({
		onResizeStart: function() {
			$('.masonry img').stop().animate({opacity: 0}, 500);
		},
		onResizeEndAfterMasonry: function() {
			$('.masonry img').stop().animate({opacity: 1}, 500);
		}
	});
});

About

Display multiple images with various proportions in rows of equal height and width.

Resources

Stars

Watchers

Forks

Packages

No packages published