How should I initialize jQuery?
<p>I have seen this (I'm also using it):</p>

<pre><code>$(document).ready(function(){
   // do jQuery
})
</code></pre>

<p>and also this (I have tried lately):</p>

<pre><code>(function(){
   // do jQuery
})(jQuery)
</code></pre>

<p>both works fine.<br />
My question is what is the difference of the two ( except on how it looks ).<br />
Which one is more proper to use?.<br />
Can you give me some pro's and con's for each?<br />
Is there also another way of doing this?<br />
(also help me with the title above. SO suggested, "The question you're asking appears subjective and is likely to be closed.")<br />
Thanks everyone.</p>
