KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Line breaks and carriage returns... Must be the most complicated part of coding. (for me) Have this code in a page (which came from database stored as This from Ricardo\nAnd also a test\nRent 3000.00 ): <td title="This from Ricard And also a test Rent 3000.00" style="width:198px;text-align:left">....</td> Then use this to get the title attribute with 'hidden' \n's var v = $('#'+i).parent().attr('title'); // i = id of <span> child of <td> Along the way, the line breaks get lost and using the variable v into a text input box: This from RicardAnd also a testRent 3000.00 What does it take to preserve the \n's and have this look instead like below?
Tags (comma-separated)
Save Edits
Cancel