title: Masonry working when initialized in HTML, not when initializing in Javascript
body: <p>So I've had no problem getting Masonry to work when initializing in HTML, but since there is no way to implement the "imagesLoaded" without writing a little Javascript, I've decided to try and rework the site to initialize using jQuery.</p>
  
  <pre><code>&lt;head&gt;
  &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" &gt;&lt;/script&gt;
  &lt;script src="masonry/masonry.pkgd.min.js"&gt;&lt;/script&gt;
  &lt;script src="imagesloaded/imagesloaded.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() 
   {
      $('#portfoliocontent').masonry
       ({
           columnWidth: 255,
           itemSelector: '.item1'
          ).imagesLoaded(function() {
              $('#portfoliocontent').masonry('reload');
            });
        });
    });
  &lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;div id="portfoliocontent"&gt;
  &lt;div class="item1"&gt;&lt;img src="images/masonthumb1.jpg"&gt;&lt;/div&gt;
  &lt;div class="item1"&gt;&lt;img src="images/masonthumb1.jpg"&gt;&lt;/div&gt;
  &lt;div class="item1"&gt;&lt;img src="images/masonthumb1.jpg"&gt;&lt;/div&gt;
  &lt;div class="item1"&gt;&lt;img src="images/masonthumb1.jpg"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>The reason I'm reworking at all is because of the images stacking on load, and now I can't even get Masonry to initialize at all. I'm not the most familiar with Javascript or jQuery, so any help is appreciated. Thanks. </p>