title: Uncaught TypeError: Cannot read property 'element' of undefined, cannot call methods on masonry prior to initialization; attempted to call 'reload'
body: <p>Please help me to figure out what is the issue, I'm getting two errors</p>
  <blockquote>
  <p>1.Uncaught TypeError: Cannot read property 'element' of undefined</p>
  <p>2.cannot call methods on masonry prior to initialization; attempted to call 'reload'.</p>
  </blockquote>
  <p>Javascript</p>
  <pre><code>$(&quot;#articleview&quot;).append(articles);
  initialiseMasonry();
  function initialiseMasonry() {
      $('#articleview').masonry({
          itemSelector: '.masonry_thumbnail',
          //columnWidth: 580,
          isAnimated: true,
      }).imagesLoaded(function () {
          hideLoadingImg(true);
          $(this).masonry('reload');
      });
  }
  </code></pre>
  <p>I'm appending articles in articleview and getting in html by id.</p>