title: Uncaught TypeError: undefined is not a function (jQuery & jQuery UI)
body: <p>I am trying to use the jQuery UI autocomplete widget but I'm getting the following error in Google Chrome:</p>
  
  <blockquote>
    <p>Uncaught TypeError: undefined is not a function jquery-ui.min.js:7<br>
    e.widget.refresh jquery-ui.min.js:7<br>
    (anonymous function) jquery-ui.min.js:6<br>
    e.widget._create jquery-ui.min.js:6<br>
    (anonymous function) jquery-ui.min.js:6<br>
    e.Widget._createWidget jquery-ui.min.js:6<br>
    e.(anonymous function).(anonymous function) jquery-ui.min.js:6<br>
    (anonymous function) jquery-ui.min.js:6<br>
    n.extend.each jquery-2.1.1.min.js:2<br>
    n.fn.n.each jquery-2.1.1.min.js:2<br>
    e.fn.(anonymous function) jquery-ui.min.js:6<br>
    e.widget._create jquery-ui.min.js:7<br>
    (anonymous function) jquery-ui.min.js:6<br>
    e.Widget._createWidget jquery-ui.min.js:6<br>
    e.(anonymous function).(anonymous function) jquery-ui.min.js:6<br>
    (anonymous function) jquery-ui.min.js:6<br>
    n.extend.each jquery-2.1.1.min.js:2<br>
    n.fn.n.each jquery-2.1.1.min.js:2<br>
    e.fn.(anonymous function) jquery-ui.min.js:6<br>
    (anonymous function) create:684<br>
    j jquery-2.1.1.min.js:2<br>
    k.fireWith jquery-2.1.1.min.js:2<br>
    n.extend.ready jquery-2.1.1.min.js:2<br>
    I jquery-2.1.1.min.js:2  </p>
  </blockquote>
  
  <p>I include jQuery and jQuery UI in the header like so:</p>
  
  <pre><code>&lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Client DB&lt;/title&gt;
      &lt;link href="/css/styles.css" rel="stylesheet" /&gt;
      &lt;link href="/css/selectize.default.css" rel="stylesheet" /&gt;
      &lt;link href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" rel="stylesheet" /&gt;
      &lt;script src="/js/jquery-2.1.1.min.js"&gt;&lt;/script&gt;
      &lt;script src="/js/jquery-ui.min.js"&gt;&lt;/script&gt;
      &lt;script src="/js/selectize.min.js"&gt;&lt;/script&gt;
      &lt;script src="/js/autogrow.js"&gt;&lt;/script&gt;
      &lt;script src="/js/jquery.mattni.cloner-0.1.js"&gt;&lt;/script&gt;
      &lt;script src="/js/filter-years.js"&gt;&lt;/script&gt;
      &lt;script src="/js/jquery.filter.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>I then call the function at the end of my HTML like so (I've replaced some information which is sensitive to the client):</p>
  
  <pre><code>&lt;script&gt;
  
  $(function(){
      console.log("You autocomplete me");
      var availableTags = ["Autofill 1","Autofill 2"];
      $("#ref").autocomplete({source: availableTags});
  
      $("#basis").autocomplete({source: ["Choice 1", "Choice 2"]});
      $("#brand").autocomplete({source: ["Possible option", "Unladen swallow"]});
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>This worked at one point and now suddenly it is now. I have scoured the web looking for anyone having the same issue. I can only find examples of people receiving one or two errors, not a long list like this. I get the same errors if I link to jQuery and jQuery UI on Google, so I know it's not an issue with the files.</p>
  
  <p>Has anyone seen these errors before or know how to fix them?</p>