title: Uncaught ReferenceError: Cookies is not defined
body: <p>I'm trying to assign a cookie value to a variable, but receiving an error:</p>
  
  <blockquote>
    <p>Uncaught ReferenceError: Cookies is not defined</p>
  </blockquote>
  
  <p>I've tried <code>var name = Cookies.get('name');</code> but I still get the same error. <a href="http://code.iamkate.com/javascript/using-cookies/" rel="nofollow noreferrer">This documentation</a> also states to use the above approach.</p>
  
  <p>I then assumed that the cookie value must be undefined when executing this script, so decided to check the cookie before trying to assign it to a var, like this:</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>(function($) {
    $(document).ready(function() {
      if (Cookies.get('name')) {
        var name = Cookies.get('name');
      }
    });
  })(jQuery);
  </code></pre>
  
  <p>... But still seeing the same error. Ideas?</p>