Code: Show/Hide blah |
Code: Show/Hide this.innerText = "" |
Code: Show/Hide <div class="genmed" style="margin-bottom:2px"> <b>Code:</b> <span class="gensmall"> <a onclick="if (this.parentNode.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" style="width:45px;font-size:10px;margin:0px;padding:0px;" value="Hide" href="javascript:void(0)">Show/Hide</a> </span> </div> |
Samapico wrote: | |
On Chrome, the show/hide button that appears with code tags doesn't seem to work right... You click it once, it hides the code, but it also hides the "show/hide" link, so you can't show it back.
Is it just me?
|
Code: Show/Hide if (this.parentNode.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') {
this.parentNode.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; } |
Cheese wrote: |
could you install a black theme |
Hakaku wrote: |
If you remove the two "this.innerText = '';", the code will work properly on Chrome (and any other WebKit derivative), as well as IE8 and probably Opera too. Firefox has no implementation of innerText, so it's simply ignored, hence why it seemingly works fine. |
Hakaku wrote: |
There's also an issue with the text editor buttons (i.e. [tag]...[/tag]), where they won't wrap tags around highlighted portions of text. |