My code is
var ssMasonryFolio = function () {
var containerBricks = $('.masonry');
containerBricks.imagesLoaded(function () {
containerBricks.masonry({
itemSelector: '.masonry__brick',
resize: true
});
});
};
it gives error on imagesLoaded function
Imagesloaded is actually not a masonry function. It is a separate script, as described here. You need to download it and load it before masonry.