How soon can I retrieve a DOM element's size?
<p>I'm using the <code>window.load</code> event to make an ajax call to retrieve some html, which I then use in populating the .html attribute of an <code>&lt;li&gt;</code> element.  This works, though the performance could be better since everything has to be loaded before my call begins.</p>

<p>As part of this ajax call one of the parameters is the <code>&lt;li&gt;</code>'s <code>outerWidth</code> value.  However, when I try making the ajax call in, say, the <code>document.ready</code> handler the <code>outerWidth</code> is not properly set.  I assume that's because the DOM elements haven't had a chance to know their final sizes at that point.  However, is there an event I can handle before <code>document.ready</code> fires in which I would know the element's size?  Something between <code>window.load</code> and <code>document.ready</code>?</p>

<p>I've also used jQuery mobile's pageinit event in lieu of <code>document.ready</code> but there was no difference in this case, which is understandable.  I'll be using pageinit going forward fwiw.</p>
