Creating html element with jquery, how can I get element's width?
<p>I'm creating html element using jQuery like so: </p>

<pre><code>    var newListItem = $("&lt;li&gt;" + variableName + "&lt;/li&gt;");

    var widthOfNewItem = newListItem.width(); //&lt;-- will return 0
</code></pre>

<p>How can I find this new elements width?  I'm trying to call <code>newListItem.width()</code> but that returns 0. </p>
