difference between document.ready() inner function and a function in <script></script> tag
<p>What is the difference between these two functions?</p>

<p>1:</p>

<pre><code>$(document).ready(function myfunc() {
   function dosomething() {
      // do something
   }
});
</code></pre>

<p>2:</p>

<pre><code>&lt;script language="javascript"&gt;
function dosomething() {
   // do something
}
&lt;/script&gt;
</code></pre>
