Skip to content

Instantly share code, notes, and snippets.

@devdays
Created November 30, 2014 20:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save devdays/6fc05a3bd0618d8fa1a9 to your computer and use it in GitHub Desktop.
SignalR - open a connection with the hub
$.connection.hub.start().done(function () {
$('#sendmessage').click(function () {
// Call the Send method on the hub.
chat.server.send($('#displayname').val(), $('#message').val());
// Clear text box and reset focus for next comment.
$('#message').val('').focus();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment