Conditionally adding a <br> to text within a <p> tag using jQuery
<p>I have HTML code like this:</p>

<pre><code>&lt;div id="paragraph"&gt;
&lt;pre&gt;
&lt;p&gt;First Line in the paragraph , this goes very long and very very long&lt;/p&gt;
&lt;p&gt;This line is of normal size
&lt;/pre&gt;
&lt;/div&gt;
</code></pre>

<p>Now, because of the first line, I get a scroll bar in my dialog box. I want to use jQuery and break the text inside the all <code>&lt;p&gt;</code> tag inside the "paragraph" <code>div</code> if it's greater than certain length during body load. So that it becomes something like this:</p>

<pre><code>&lt;div id="paragraph"&gt;
&lt;pre&gt;
&lt;p&gt;First Line in the paragraph , this goes very long
&lt;br/&gt;
and very very long&lt;/p&gt;
&lt;p&gt;This line is of normal size
&lt;/pre&gt;
&lt;/div&gt;
</code></pre>

<p>Is there a way to do this using jQuery?</p>

<p>Thanks!
Pratik</p>
