title: Why doesn't my packery code execute?
body: <p>I've added packery to my dev site to play around with a new layout - it works great and so I've rolled the same code out to production. For some reason, it doesn't execute via my prod instance. My initial thought is its a code ordering problem when I run my pre-compile.</p>
  
  <p><a href="http://binary-organism.com:8080/all" rel="nofollow">Here is my dev instance</a> showing the working code. <a href="http://mr.prtlst.com/all" rel="nofollow">Here is my prod instance</a> where the code doesn't seem to initialize.</p>
  
  <p>Here is my CSS:</p>
  
  <pre><code>/* Packery */
  
  .item-content {
    border-color: hsla(0, 0%, 100%, 0.4);
    -webkit-transition: width 0.4s, height 0.4s;
       -moz-transition: width 0.4s, height 0.4s;
         -o-transition: width 0.4s, height 0.4s;
            transition: width 0.4s, height 0.4s;
  }
  
  .item.is-expanded {
    z-index: 2;
  }
  </code></pre>
  
  <p>My jquery:</p>
  
  <pre><code>//Packery
  
  var $container = $('.packery').packery();
  
    $container.on( 'click', '.item', function( event ) {
      var $item = $( event.currentTarget );
      var isExpanded = $item.hasClass('is-expanded');
      $item.toggleClass('is-expanded');
      if ( isExpanded ) {
    // if shrinking, just layout
    $container.packery();
      } else {
        // if expanding, fit it
        $container.packery( 'fit', event.currentTarget );
      }
    });
  </code></pre>
  
  <p>I'm currently not using the click feature yet but plan to in the future so it remains in the code.</p>
  
  <p>And my html:</p>
  
  <pre><code>&lt;div id="container" class="packery"&gt;
      &lt;%= render partial: 'shared/show_projects', collection: @projects %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>partial:</p>
  
  <pre><code>&lt;div class="item capsule span6"&gt;
    &lt;p&gt;
      &lt;div class="row"&gt;
        &lt;div class="span4"&gt;
              SNIP!
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Could it be that when my pre-compile runs that my jquery is inserted above the packery.js and so it doesn't initialize as intended?</p>