Fix some image glitches while not all images are loaded.
This commit is contained in:
parent
248ff5a88f
commit
3c310e3460
2 changed files with 8 additions and 5 deletions
|
@ -1,8 +1,10 @@
|
||||||
$(function() {
|
$(function() {
|
||||||
$('#covers').masonry({
|
$('#covers').imagesLoaded(function() {
|
||||||
columnWidth: 265,
|
$('#covers').masonry({
|
||||||
gutter: 5,
|
columnWidth: 265,
|
||||||
isFitWidth: true,
|
gutter: 5,
|
||||||
itemSelector: '.cover-item'
|
isFitWidth: true,
|
||||||
|
itemSelector: '.cover-item'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css">
|
||||||
<script src="vendors/jquery-2.1.0.min.js"></script>
|
<script src="vendors/jquery-2.1.0.min.js"></script>
|
||||||
<script src="vendors/masonry-3.1.5.pkgd.min.js"></script>
|
<script src="vendors/masonry-3.1.5.pkgd.min.js"></script>
|
||||||
|
<script src="vendors/imagesloaded-3.1.4.pkgd.min.js"></script>
|
||||||
<script src="main.js"></script>
|
<script src="main.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Reference in a new issue