Javascript code:
Expand|Select|Wrap|Line Numbers
- function expandcollapseBGrows(anchor) {
- var span = document.getElementById("BGrows");
- span.style.display = (span.style.display=='block')?'none':'block';
- anchor.innerHTML = (anchor.innerHTML=='hide')?'»':'hide';
- }
Now, here's my question. This code currently works - when I click on the hide link, my subitems are hidden and I see a right angle quote. When I click on the right angle quote, my subitems appear, and my link changes to "hide."
If I replace "hide" with "«" in the script, though, I run into a problem. Everything still appears and disappears as it should. However, my link, instead of changing from a right angle quote to a left angle quote, now just changes to a left angle quote, and then stays that way. It doesn't change back to a right angle quote.
This seems strange, since it switches back and forth without problems if it is text. For some reason, though, entity references seem to throw it off.