Quantcast
Channel: Niluka Blog » Jquery
Viewing all articles
Browse latest Browse all 17

Masonry js first time overlaps

$
0
0

When page load first time masonry overlaps images, and after refresh it work fine.

Images were overlapping at the first loading time. Overcome this by first loading the images.
If the images are loaded then only your masonry’s duty has to start.It should work fine.


$(window).load(function(){
	var container = document.querySelector({id});
	var msnry = new Masonry( container, {
	  itemSelector: '.item',
	  gutter: 5,
	  isAnimated:true
	});
});



Viewing all articles
Browse latest Browse all 17

Latest Images

Trending Articles





Latest Images