KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How do I get jQuery text() to preserve blanks? I want $("#ele").text("a a"); to actually show up with the spaces in between. I have created a JSFiddle to illustrate the problem. https://jsfiddle.net/ZX4x9/ .html() works, but then I'd have to convert the other entities first ( < , > , " , etc.). And, it seems that text() should be able to do this.
Tags (comma-separated)
Save Edits
Cancel