Created
November 30, 2014 20:37
-
-
Save devdays/6fc05a3bd0618d8fa1a9 to your computer and use it in GitHub Desktop.
SignalR - open a connection with the hub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.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