Permalink
Browse files

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.
  • Loading branch information...
loveky committed Mar 8, 2013
1 parent d7273e2 commit bfabbe7861f4db317b675873f38cc5e97e84655a
Showing with 3 additions and 3 deletions.
  1. +3 −3 examples/chat.rb
View
@@ -42,6 +42,9 @@
@@ chat
<pre id='chat'></pre>
+<form>
+ <input id='msg' placeholder='type message here...' />
+</form>
<script>
// reading
@@ -56,6 +59,3 @@
});
</script>
-<form>
- <input id='msg' placeholder='type message here...' />
-</form>

0 comments on commit bfabbe7

Please sign in to comment.