title: Uncaught TypeError: $(...).velocity is not a function
body: <p>I have the following code:</p>
  
  <pre><code>var $ = require('jquery');
  var velocity = require('velocity-animate');
  
  module.exports = function () {
  
      function togglePanel () {
  
          $('.trip-assist-search-panel__container').velocity({
              height: '0px'
          },{
              duration: 400
          });
  
      }
  
      return {
          togglePanel: togglePanel
      };
  
  }();
  </code></pre>
  
  <p>When <code>togglePanel()</code> gets triggered, the following error gets thrown:</p>
  
  <blockquote>
    <p>Uncaught TypeError: $(...).velocity is not a function</p>
  </blockquote>
  
  <p>Which is usually solved by making sure you're loading JQuery before a library that requires it. But, I am.. </p>
  
  <pre><code>var $ = require('jquery'); // first
  var velocity = require('velocity-animate'); // second
  </code></pre>
  
  <p>So.. what gives?</p>