var preserved = $('textarea').val().replace(/\n\r?/g, '%0D%0A');
jQuery Preserve textarea line breaks for AJAX call
Snippet Viewed 16505 times.
Share your jQuery code snippets:
- Get some recognition & a link back to your site.
- Create your own code library.
- Help your fellow developers, as they have helped you.