Nested Javascript Functions and jQuery
<p>I am learning javascript and jquery and wondered whether it is good or bad practice to nest all my functions within <code>$(document).ready(function)</code>.  Is there any difference between this:</p>

<pre><code>function someFunction()
{
  return someThing;
}

$(document).ready(function()
{
  // some code
  ...
  someFunction();
});
</code></pre>

<p>and this:</p>

<pre><code>$(document).ready(function()
{
  // some code
  ...
  function someFunction()
  {
    return someThing;
  }

  someFunction();
});
</code></pre>

<p>Be gentle - I'm pretty new to this!</p>
