title: jQuery to submit textarea with enter key
body: <p>I have this simple sctipt</p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-1.10.1.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      $(function(){
           $("#message").keypress(function(e){
              var code = (e.keyCode ? e.keyCode : e.which);
              if (code == 13){
                    $("#query").submit();
              }
            });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>and this html:</p>
  
  <pre><code>&lt;div id="textarea"&gt;
      &lt;form name="query" class="form1" id="query" action="query.py" method="post"&gt;
          &lt;textarea rows="2" name="message" id="message" class="message" placeholder="RM911 Chat" cols="26"&gt;&lt;/textarea&gt;
          &lt;input type="submit" id="submit" name="submit1" value="a"/&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>if input's id is "submit" nothing works, if it's id is something else - it works... But the whole project uses "submit" id for submit buttons, and I don't want to rename it (because of CSS). Is there anything I can do?</p>