These are all equivalent, the code inside the blocks will run when the document is ready:
$(function() {
// code
});
$().ready(function() {
// code
});
$(document).ready(function() {
// code
});
Because these are equivalent the first is the recommended form, the following is a ...