Skip to content

Instantly share code, notes, and snippets.

@davidfowl
Created June 13, 2012 18:18
Show Gist options
  • Save davidfowl/2925621 to your computer and use it in GitHub Desktop.
Save davidfowl/2925621 to your computer and use it in GitHub Desktop.
Connection initialization in multiple pages
// --- outside of the user controls, e.g. on the container page ---
$(function() {
window.hubReady = $.connection.hub.start();
});
// --- in your other pages ---
$(function() {
window.hubReady.done(function() {
// call hub method
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment