I have HTML code like this:
<div id="paragraph">
<pre>
<p>First Line in the paragraph , this goes very long and very very long</p>
<p>This line is of normal size
</pre>
</div>
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 <p>
tag inside the "paragraph" div
if it's greater than certain length during body load. So that it becomes something like this:
<div id="paragraph">
<pre>
<p>First Line in the paragraph , this goes very long
<br/>
and very very long</p>
<p>This line is of normal size
</pre>
</div>
Is there a way to do this using jQuery?
Thanks! Pratik