jQuery $( function() {} ) and $(document).ready the same?
<p>To have a working datepicker on a field, I have to put this script inside my  element</p>

<pre><code>$( function() {
  $( "#date_datepicker" ).datepicker( { dateFormat: "yy-mm-dd" } );
});
</code></pre>

<p>Removing the  <code>$( function() {</code>  makes the datepicker not work.</p>

<p>So does it mean that the <code>$( function() {</code> is the same as <code>$(document).ready</code>?</p>

<p>I'm trying to optimize my javascript codes so knowing this might help.</p>
