[FIX] get masonry to initialize properly
This commit is contained in:
parent
0762dd0294
commit
2d714c2393
4 changed files with 105 additions and 4 deletions
|
@ -44,14 +44,19 @@ echo js('assets/vendors/bootstrap/js/dist/carousel.js');
|
|||
</style>
|
||||
|
||||
<?php echo js('assets/vendors/masonry/dist/masonry.pkgd.min.js');?>
|
||||
<?php echo js('assets/vendors/imagesloaded.pkgd.min.js');?>
|
||||
|
||||
<script type="text/javascript" nonce="nRfqpuKWNuYyUAFPTr6WVNZk9">
|
||||
$('#masonry').masonry({
|
||||
isFitWidth: true,
|
||||
var $grid = $('#masonry').masonry({
|
||||
fitWidth: true,
|
||||
columnWidth: <?php echo c::get('plg_masonry.width') ?>,
|
||||
gutter: 10,
|
||||
itemSelector: '.masonryitem'
|
||||
});
|
||||
// layout Masonry after each image loads
|
||||
$grid.imagesLoaded().progress( function() {
|
||||
$grid.masonry('layout');
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php echo js('assets/vendors/swipebox/src/js/jquery.swipebox.min.js');?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue