What's the difference between :
$(function() { ... });
and
$(document).ready(function() { ... });
and what mean this $() ?
As stated in the docs http://api.jquery.com/ready/
$( document ).ready(function() { // Handler for .ready() called. });
Which is equivalent to calling:
$(function() { // Handler for .ready() called. });
$
is just a variable name / shortcut for jQuery
so you're basically calling the function jQuery()
and passing some parameters to it or calling it's methods
There is no difference between the two, the first one is the alias for the second one.