title: New to jQuery, ajax not working
body: <p>I am very new to jQuery, and I am probably doing this wrong, but here is my problem. I have a page where a user puts input into boxes and hits submit, where response data will be generated on the server and sent back with AJAX. However, nothing happens when I press submit... I know the function is being called, so I think my jQuery code is wrong.</p>
  
  <p>Here is my code, simplified:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;style type="text/css"&gt;
  #hide {
      display:none;
  }
  &lt;/style&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
      $("#submit").click(doAjax());
  });
  function doAjax() {
      $.ajax({
          type:"GET",
          data:"myquerystring",
          url:"dummy.php"
      }).done(function(data){
          $("#hide").css("display","inline");
          $("#result").html(data);
      });
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;Enter your text:&lt;/p&gt;
  &lt;!--Code for textboxes--&gt;
  &lt;button id="submit"&gt;Submit&lt;/button&gt;
  &lt;p id="hide"&gt;Result:&lt;pre id="result"&gt;&lt;/pre&gt;&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Right now, dummy.php is just:</p>
  
  <pre><code>&lt;?php
  echo "hi";
  ?&gt;
  </code></pre>
  
  <p>so that's not the problem. Can anyone help me with this?</p>
  
  <p>UPDATE: Chrome tells me: </p>
  
  <pre><code> Uncaught TypeError: Object #&lt;XMLHttpRequest&gt; has no method 'done'
  </code></pre>
  
  <p>when i try to run doAjax()</p>