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:
parent
d7273e2bd6
commit
bfabbe7861
1 changed files with 3 additions and 3 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue