Weirdness using jquery's .html() function to set <a></a> with a special character ✓ (checkmar
Posted
by Sam
on Stack Overflow
See other posts from Stack Overflow
or by Sam
Published on 2010-06-07T19:39:08Z
Indexed on
2010/06/07
19:42 UTC
Read the original article
Hit count: 224
Hey all,
I'm trying to have the following tag toggle between a "-" and the checkmark character (✓)
<a id='p_4' class='fancy_button orange bls_button' href='#'>-</a>
And here's the jquery code:
if (button.text() == '-') {
button.html('✓'); }
This works in FF3.6 and IE8, but not in WebKit (Chrome or iPhone safari).
Is there something I'm doing wrong, or does webkit just not like .html("✓")
Thanks, Sam
© Stack Overflow or respective owner