Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

chat example: .live is removed in latest jquery, use .submit #632

Merged
merged 2 commits into from

3 participants

@mcfiredrill

No description provided.

@JonRowe

+1 For keeping the samples up to date, but alternatively use on? That's the preferred method according to the docs...

@rkh
Owner

+1 for on

@mcfiredrill

Should I squash?

@rkh rkh merged commit a5588e9 into sinatra:master
@mcfiredrill mcfiredrill deleted the unknown repository branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  examples/chat.rb
View
2  examples/chat.rb
@@ -49,7 +49,7 @@
es.onmessage = function(e) { $('#chat').append(e.data + "\n") };
// writing
- $("form").live("submit", function(e) {
+ $("form").on('submit',function(e) {
$.post('/', {msg: "<%= user %>: " + $('#msg').val()});
$('#msg').val(''); $('#msg').focus();
e.preventDefault();
Something went wrong with that request. Please try again.