Answer the question
In order to leave comments, you need to log in
ImagesLoaded is not a function why?
Uncaught TypeError: $container.imagesLoaded is not a function
I'm trying to connect Masonry, I'm doing the lessons, all the paths are correct, but the console gives an error. I don't understand why
js
<script type="text/javascript" src="/assets/templates/site/adaptiv/libs/imagesloaded/imagesloaded.pkgd.min.js"></script>
<script type="text/javascript" src="/assets/templates/site/adaptiv/libs/imagefill/jquery-imagefill.js"></script>
<script type="text/javascript" src="/assets/templates/site/adaptiv/libs/masonry/masonry.pkgd.min.js"></script>
<script type="text/javascript">
$(window).load(function(){
var $container = $(".masonry-container");
$container.imagesLoaded(function () {
$container.masonry({
columnWidth: ".item",
itemSelector: ".item"
});
});
});
</script>
<div id="container" class="masonry-container">
<div class="item">
<img src="/assets/galleries/102/11.jpg" alt="">
</div>
<div class="item">
<img src="/assets/galleries/102/1.jpg" alt="">
</div>
</div>
Answer the question
In order to leave comments, you need to log in
In general, I solved the problem. it turned out there were glitches in other scripts because of this and gave an error
imagesLoaded now needs to be loaded separately: imagesloaded.desandro.com
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question