.imagesLoaded is not a function

I’m using mustache.js, masonry and I was trying to use imagesLoaded to avoid overlapping images.

My code was returning me .imagesLoaded is not a function
Some people on the interwebs said that disabling Rocket Loader in CloudFlare… didn’t work for me.

After more than 2 hours I got the solution – without using imagesLoaded -.

    $(window).load(function() {

      // Masonry Trigger
      var $container = $('#masonry-wrap');

         // options
         itemSelector: '.masonry-box', 
         columnWidth: 283 



Solution was taken from jQuery masonry with WordPress and imagesLoaded and given by McNab!

Leave a Reply

Your email address will not be published. Required fields are marked *