Q:

Call a function on DOM ready from outside ? 

In jQuery you can wrap all your code in $(function() { ... }); and have it fire when the DOM is ready, but what if you want to put that in the middle of the page somewhere?  Isn't it possible that the DOM ready event will fire before it processes that chunk of code and it'll get missed?  Is there a way to guarantee it'll get fired? 

A:

You can place a <script>..</script> block anywhere in your code:

if you use .ready() (or equivalent syntax) to execute code when the dom is loaded, it will be executed when the whole page is loaded, no matter where you placed the ready() handler. 
if you simply put code within the <script> tags, then it will be executed whenever the parser reaches that point of the code. 

A:

No, it is not possible for the DOM ready event to fire when the DOM is not ready.  It will be fired, regardless of where you place your script.