Created
July 25, 2014 18:21
-
-
Save elbruno/5a0241389e477aade5d5 to your computer and use it in GitHub Desktop.
ElBruno - SignalR Html Client On Connected On Hub III
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
<script type="text/javascript"> | |
var hub; | |
$(window).ready(function () { | |
console.log("windows ready para SignalR"); | |
hub = $.connection.SampleHub; | |
// dummy call to force the [OnConnected()] method on signalR hub | |
hub.client.foo = function () { }; | |
$.connection.hub.start().done( | |
function () { | |
var area = 'default'; | |
console.log("hub started, area:" + area); | |
hub.server.JoinToArea(area); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment