I'm working with SignalR, and by extension, JQuery.
Some initialisation code runs inside a function block defined with the following syntax:
$(function () {
// ... Init code here e.g.
var hub = $.connection.myHub;
});
What is the functional difference here compared with just executing scripts directly within a pair of script tags?
Its simply shorthand for:
$(document).ready(function(){
});
http://api.jquery.com/ready/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With