How to check a string is longer than the container div's width in Jquery?
<p>E.g:</p>

<pre><code>.container{ width:200px; height:16px;overflow:hidden;font-size:13px; }

&lt;div class="container"&gt;
I want to know this sentence's width is bigger than my container div's width
&lt;/div&gt;
</code></pre>

<p>and if the string inside the <code>container</code> is <code>much longer</code> , is there a way I can <code>animate the string from begin to the end and loop again and again</code>. But if shorter,just stay!!</p>

<p><strong>[update]</strong></p>

<p><code>With Don's way</code>, the <code>inner element with string's width</code> aways equal the <code>width of container</code> and string was wrapped.So,how can I do to set the <code>inner element's width</code> to be the <code>string's actual length</code>!?</p>

<p>Thank you very much!</p>
