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

This commit is contained in:
Tony Miller 2013-02-06 13:16:21 -08:00
parent 189bce49f0
commit 74b301268b
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ __END__
es.onmessage = function(e) { $('#chat').append(e.data + "\n") };
// writing
$("form").live("submit", function(e) {
$("form").submit(function(e) {
$.post('/', {msg: "<%= user %>: " + $('#msg').val()});
$('#msg').val(''); $('#msg').focus();
e.preventDefault();