Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

examples/chat.rb is not working #663

Merged
merged 1 commit into from

2 participants

@loveky

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(script tag).

@loveky loveky 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.
bfabbe7
@rkh rkh merged commit 6017973 into sinatra:master
@rkh
Owner
rkh commented

I thought on now behaves like live which is the reason jquery dropped live in a minor release?

I think I might need to drop jquery from my projects. +1 for a PR that removes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 8, 2013
  1. @loveky

    move the form tag before script tag

    loveky authored
    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 page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 examples/chat.rb
View
6 examples/chat.rb
@@ -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>
Something went wrong with that request. Please try again.