Is there any ways inserting special html codes:
(     – —)
using .text()?
Following construction will not work:
$.text(' ');
JSFiddle (if necessary): http://jsfiddle.net/7yR95/
Is there any ways inserting special html codes:
(     – —)
using .text()?
Following construction will not work:
$.text(' ');
JSFiddle (if necessary): http://jsfiddle.net/7yR95/
use html() instead of text(), theres no way text() can make — to be a dash
check the fiddle for html()
$('.result').html('—');
text()append but the question is - Can achieve using textYou can use '\xa0' for :
.text('\xa0');
----> xa0
– ----> x96
— ----> x97
text()sets the text content of the element, so no. Why not usehtml()instead?