title: Manually adding / loading jQuery with PrimeFaces results in Uncaught TypeErrors
body: <p>I'm using PrimeFaces 3.5 and JSF 2.0. I wanted to use a jQuery plugin, so I included jQuery in my webapp.</p>
  
  <pre><code>&lt;h:head&gt;
      &lt;h:outputScript name="js/jquery.min.js" /&gt;
      &lt;h:outputScript name="js/jquery-ui.js" /&gt;
  &lt;/h:head&gt;
  </code></pre>
  
  <p>However, when using PrimeFaces components, I get uncaught type errors like this:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'length' of undefined</p>
  </blockquote>
  
  <p></p>
  
  <blockquote>
    <p>Uncaught TypeError: Object [object Object] has no method 'autocomplete' </p>
  </blockquote>
  
  <p></p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'keyCode' of undefined</p>
  </blockquote>
  
  <p></p>
  
  <blockquote>
    <p>Uncaught TypeError: this.jq.draggable is not a function</p>
  </blockquote>
  
  <p></p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'LinearAxisRenderer' of undefined</p>
  </blockquote>
  
  <p></p>
  
  <blockquote>
    <p>Uncaught TypeError: Object [object Object] has no method 'fileupload'</p>
  </blockquote>
  
  <p></p>
  
  <blockquote>
    <p>Uncaught TypeError: this.jqEl.datetimepicker is not a function</p>
  </blockquote>
  
  <p>Etc.</p>
  
  <p>How is this caused and how can I solve it?</p>