Wrapping new lines with <p> tag.
I want to jQuery to format the following:
<div>
text on line 1
text on line 2
text on line 3
text on line 4
</div>
like this:
<div>
<p>text on line 1</p>
<p>text on line 2</p>
<p>text on line 3</p>
<p>text on line 4</p>
</div>
I have read a zillion posts and some that are similar but have not been able to translate them into my problem.
Thank you.