jQuery width(); not working properly
<p>I think I'm going crazy :).</p>

<p>In my js file I have:</p>

<pre><code>alert( $('.element').width() );
</code></pre>

<p>it will alert "867"...Which is wrong.</p>

<p>In the Chrome or Firefox console i type:</p>

<pre><code>$('.element').width();
</code></pre>

<p>It responds with 567. Which is correct.</p>

<p>Am I missing something here. Should I be doing this a different way. Cause the code in the js file is messing everyting up.</p>

<p>BTW the element does have a width and float set through CSS -- width: 80% and float: left. But the browser consoles still give me the right width.</p>

<p>Thanks.</p>