I have this function here that toggles between different ASCII symbols (⊕ (⊕) and &ominus (⊖) specifically) on click. What I can't figure out is after it changes to ⊖ it wont change back. Anyone know why?
This generates the table row
"<tr><td>Other</td><td>" + stats.others.length + <span class='displaybutton' style='cursor:pointer;'>⊕</span></td></tr>";
The important part being this <span>
<span class='displaybutton' style='cursor:pointer;'>⊕</span>
This is supposed to switch between the symbols
$('.displaybutton').click(function(){
$('#otherResponseList').toggle();
if($(this).html() == '⊖'){
$(this).html('⊕');
} else {
$(this).html('⊖');
}
});