title: Jquery Autocomplete not attaching to text input box
body: <p>I am trying to use the jquery autocomplete plugin but am having trouble getting it to attach to my textarea #message or #messageid, (two different ones). It works when I set the function attach() to the onClick events of either element but if I execute it normally, or use $(document).ready(attach()) it doesn't seem to do anything. </p>
  
  <p>This is the culled code of a page I made to try and debug it that retains the issue (the real page is fairly complex, split into a few files)</p>
  
  <p>Thanks!</p>
  
  <pre><code>&lt;head&gt;
  &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/jquery.easing.1.3.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"&gt;&lt;/script&gt;
  
  
  &lt;script type="text/javascript"&gt;
  
  
  $(document).ready(attach())
  
  function attach(){
  $("#messageid").autocomplete({
  
      source: function(request, response){
          $.post("utilities/atuser.php", {data: request}, function(data){
  
              alert(data);
  
              });
  
  
          },
      appendTo: "#content"
  });
  
  }
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;form action="utilities/s_shoutout.php" method="post" id="sideshoutout" class="frmshoutout"&gt;
  
      &lt;textarea name="message" cols="25" id="messageid" onclick=";"&gt;&lt;/textarea&gt;
   &lt;br /&gt;&lt;br /&gt;
      &lt;input type="submit" /&gt;
  </code></pre>
  
  <p></p>