title: jQuery autocomplete problems with ajax - TypeError: this.source is not a function
body: <p>I'm using the jQueryUI autocomplete function it works fine with data from a local variable but when using data from a $.get request i'm getting the following error: TypeError: this.source is not a function. If I remove $(function(){ in the code there is no error but still no data in autocomplete. </p>
  
  <pre><code>Content in: index.html
  &lt;script&gt;
  $(function(){
  var ajaxData;
  $.get('ajaxdata.html', function(data) {
  $('.result').html(data);
  console.log('Load was performed.'+data);
  ajaxData = data;
  });
  
  var localData = ['ActionScript','AppleScript','Scheme'];
  $( "#tags" ).autocomplete({
  //source: localData //working
  source: ajaxData //not working
  });
  });
  &lt;/script&gt;
  &lt;input id="tags"&gt;
  
  Content in: ajaxdata.html
  ['ActionScript','AppleScript','Scheme']
  </code></pre>