源代码:
...
#masonry ul {
width:100%;
list-style: none;
}
#masonry li {
float: left;
list-style: none;
}
#imageList {border:2px solid;}
.ias-trigger {
position:absolute;
bottom:0px;
left:300px;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="scripts/masonry.pkgd.js"></script>
<script src="scripts/imagesloaded.pkgd.min.js"></script>
<script src="scripts/jquery-ias.min.js"></script>
</head>
<body>
<div id="masonry">
<ul id="imageList">
<?php
$dsg_pagination_per_page = 10;
$dsg_thumb_operation = 'scale';
$dsg_thumb_width = 300;
$dsg_thumb_height =300;
?>
<?php include 'dsg.php'; ?>
</ul>
</div>
<br>
<?php echo $dsg_pagination_nav; // print pagination links ?>
<script>
var $container = $('#imageList');
//initialize Masonry after all images have loaded
$container.imagesLoaded( function() {
$container.masonry();
});
var ias = $.ias({
container: "#imageList",
item: ".item",
delay:1200,
pagination: "#pagination",
next: ".next a"
});
ias.extension(new IASSpinnerExtension());
ias.extension(new IASNoneLeftExtension({html: '<div style="text-align:center; position:absolute; bottom:0; left0;"><p><em>You reached the end!</em></p></div>'}));
</script>
</body>
</html>
答案 0 :(得分:0)
从另一篇文章中找到了答案:
tumblr masonry + infinite scrolling overlapping posts despite using desandro and new jquery