1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

move the form tag before script tag

currently this demo is not working, this is because when $("form") bind "submit" event, the form tag is not in DOM yet. Need to move form before the binding.
This commit is contained in:
loveky 2013-03-08 09:56:53 +08:00
parent d7273e2bd6
commit bfabbe7861

View file

@ -42,6 +42,9 @@ __END__
@@ chat
<pre id='chat'></pre>
<form>
<input id='msg' placeholder='type message here...' />
</form>
<script>
// reading
@ -56,6 +59,3 @@ __END__
});
</script>
<form>
<input id='msg' placeholder='type message here...' />
</form>