Masonry - imagesLoaded - Not a function

拈花ヽ惹草 提交于 2019-12-04 11:44:53

It seems that you have a Javascript conflict. To solve this issue you can putting jQuery Into No-Conflict Mode. Check out the jQuery noConflict function.

So try this :

jQuery.noConflict();
jQuery( document ).ready(function( $ ) {
 $('#masonry-container').imagesLoaded( function(){
    $('#masonry-container').masonry({
        itemSelector: '.item',
        isAnimated: true,
        isFitWidth: true
    });
 });

 $(window).resize(function() {
    $('#masonry-container').masonry({
        itemSelector: '.item',
        isAnimated: true
    }, 'reload');
 });
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!