可能是重复的问题,但是我尝试了所有发现的解决方案,我是 imagesLoaded 的新手,有人可以帮助摆脱它吗?
我包含的脚本按以下顺序-
<script type='text/javascript' src='{{asset('assets/includes/js/jquery/jquery-3.3.1.min.js')}}'></script>
<script type='text/javascript' src='{{asset('assets/includes/js/jquery/jquery-migrate.min330a.js')}}'></script>
<script type='text/javascript' src='{{asset('assets/js/imagesloaded.js')}}'></script>
<script type='text/javascript' src='{{asset('assets/js/imagesloaded.pkgd.js')}}'></script>
还有我拥有的javascript代码-
jQuery( function() {
/* ======= Masonry Grid System ======= */
var $container = $('.posts-masonry');
if ($container.length) {
$container.imagesLoaded(function() {
$container.isotope({
layoutMode: 'masonry',
transitionDuration: '0.3s'
});
});
}
});
我还缺少其他脚本吗?请提出建议。