following code is an example of text placed into a textarea from a database.
<textarea id="inputPane" cols="80" rows="40" class="pane">
<p>
some text here...
</p>
<p>
more text here...
</p>
</textarea>
using jQuery's .trim what is the actual jquery code to remove all leading and trailing whitespace and have the textarea display very similar to below?
<textarea id="inputPane" cols="80" rows="40" class="pane">
<p>some text here...</p>
<p>more text here...</p>
</textarea>
I've worked on this for hours with no success trying varying combinations with .trim
$('#inputPane')jQuery.trim(string);
Thank you everyone.