hd.
hd.

Reputation: 18306

what is difference between different syntax in jQuery?

what is the difference between:

$(function() {

//.....

});

and

$(document).ready(function() {

//......

});

in jQuery coding?

Upvotes: 4

Views: 116

Answers (1)

joni
joni

Reputation: 5462

Nothing. It does actually exactly the same, it's just a shortcut so you have to write less code.

Upvotes: 7

Related Questions