Different forms of $(document).ready
<p>I have seen people writing </p>

<pre><code>$(document).ready(function(){

});
</code></pre>

<p>and some writing</p>

<pre><code>$(function() {

        });
</code></pre>

<p>What's the difference and when to use what?</p>
