Pushing a document.ready callback: is it possible?
<p>I already have a jQuery(document).ready fragment defined. Since I'm working on a large-scale modular project, I would like to allow components to push callbacks to the document.ready event in order to run their own code without modifying the global javascript file.</p>

<p>One viable way is to define an array of callbacks into which each component (portlet, actually) will be pushing its own callback, and then have global ready callback scan the array and run each callback.</p>

<p>I wonder if there is a jQuery way to directly push a callback. I believe that if I set jQuery(document).ready from somewhere else in the code I would be surely overwriting what was already set, and not running the global initialization callback.</p>

<p>What do you suggest me to do?</p>

<p>I also read that the ready function can be used only on the document object, so I cannot bind it to HTML objects.</p>

<p>My current purpose is to map <code>Ice.onSendReceive</code> on a certain button (I'm using ICEFaces 1.8). But I would also like to extend this possibility to other function calls and avoid using <code>window.setTimeout</code></p>
