title: Masonry : undefined is not a function
body: <p>I know what the <code>undefined is not a function</code> error means, but I don't get why it is showing up here.</p>
  
  <p>I just downloaded the last Masonry version and tried to follow the docs. (<a href="http://desandro.github.io/masonry/docs/methods.html" rel="nofollow">http://desandro.github.io/masonry/docs/methods.html</a>)</p>
  
  <p>The layout is working fine, but it seems like I can't use any <code>masonry()</code> function at all. Always getting the <code>undefined is not a function</code> error on my <code>masonry()</code> calls.</p>
  
  <p>Since the layout is working, I'm assuming the masonry script is working fine, then <strong>why can't I use <code>masonry(...)</code> without this undefined function error</strong> ?</p>
  
  <p>(I searched about changes from Masonry v2 to Masonry v3, but didn't find anything related to this function)</p>
  
  <p>Partial HTML code :</p>
  
  <pre><code>&lt;a class="navbar-brand" id ="test-masonry" href="#"&gt;...&lt;/a&gt;
  
  &lt;div id="masonry-container" class="js-masonry" data-masonry-options='{ "columnWidth": 330, "itemSelector": ".item" }'&gt;
      &lt;div class="item"&gt;
          &lt;button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#createNewBlock"&gt;Create a new block&lt;/button&gt; 
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;!-- Freshly downloaded from the official Masonry website --&gt;
  &lt;script src="js/masonry.pkgd.min.js"&gt;&lt;/script&gt; 
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js"&gt;&lt;/script&gt;
  &lt;script src="js/app.js"&gt;&lt;/script&gt;
  &lt;script src="js/controllers/appCtrl.js"&gt;&lt;/script&gt;
  
  &lt;!--  Copied from the example in the docs --&gt;
  &lt;script&gt;
  $(function(){
      var $container = $('#masonry-container');
      $('#test-masonry').click(function(){
          var $boxes = $('&lt;div&gt;Test !&lt;/div&gt;');
          $container.prepend( $boxes ).masonry( 'reload' );
      });
  });
  &lt;/script&gt;
  </code></pre>