jQuery (intermediate value).imagesLoaded is not a function

Need help in debugging a tiny bit of script.

I ma using ‘masonry’ plugin to arrange numerous divs in a tile manner. The script seems to work fine except I am getting the error jQuery (intermediate value).imagesLoaded is not a function

Read More

The script in my .js file is as follows…

var container = document.querySelector('#container2');
var msnry = new Masonry( container, {
  // options
  columnWidth: 240,
  itemSelector: '.post',
  isFitWidth: true,
  isAnimated: !Modernizr.csstransitions
  }).imagesLoaded(function() {
     $(this).masonry('reload');
});

As I am using WordPress I am thinking there may be some conflict with another plugin.

Related posts

Leave a Reply

1 comment

  1. check your script for ;

    $.fn.some = function () {
       return this;
    } // without ;
    

    will produces an error, also check for return this in jQuery extensions