I have this simple sctipt
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$(function(){
$("#message").keypress(function(e){
var code = (e.keyCode ? e.keyCode : e.which);
if (code == 13){
$("#query").submit();
}
});
});
</script>
and this html:
<div id="textarea">
<form name="query" class="form1" id="query" action="query.py" method="post">
<textarea rows="2" name="message" id="message" class="message" placeholder="RM911 Chat" cols="26"></textarea>
<input type="submit" id="submit" name="submit1" value="a"/>
</form>
</div>
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?