title: How to call a function within $(document).ready from outside it
body: <p>How do you call function lol() from outside the $(document).ready() for example:  </p>
  
  <pre><code>$(document).ready(function(){  
    function lol(){  
      alert('lol');  
    }  
  });  
  </code></pre>
  
  <p>Tried:</p>
  
  <pre><code>$(document).ready(function(){
    lol();
  });
  </code></pre>
  
  <p>And simply:</p>
  
  <pre><code>lol();
  </code></pre>
  
  <p>It must be called within an outside javascript like:</p>
  
  <pre><code>function dostuff(url){
    lol(); // call the function lol() thats inside the $(document).ready()
  }
  </code></pre>