Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
193
rated 0 times [  195] [ 2]  / answers: 1 / hits: 28252  / 14 Years ago, wed, april 28, 2010, 12:00:00

I have the following JQuery code:



$(this).text('Options ▴');


However, the ascii code isn't showing up on my web page. All that shows up is on the webpage is Options ▴.



What am I doing wrong?


More From » jquery

 Answers
2

Use the .html() method instead of .text().



The whole point of .text() method is to make the text appear exactly as it's in the string, with all tags and entities.


[#96945] Monday, April 26, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
shylaelisan

Total Points: 37
Total Questions: 94
Total Answers: 110

Location: Angola
Member since Tue, May 5, 2020
4 Years ago
;