Wednesday, 07 October 2009 20:34
I was working on a bit of script today, and happened upon an interesting happenstance. I was trying to change the text of an element dynamically, and this text needed to include a non-breaking space. My original code seemed to render the entity as text, so this:
elem.setText( ' ' );
literally printed the text " " instead of the proper entity.
My solution ended up being to change the entity entirely:
elem.setText( '\u00a0' );
Comments (1)
1
Thursday, 18 March 2010 15:17
ArnoOnline
I was having a similar problem, your fix seems to work for most MooTools functions that are textrelated =).
Add your comment
Latest Articles
Most Popular
The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries. Jeff Channell is not affiliated with or endorsed by Open Source Matters or the Joomla!® Project.



