Skip to content

Instantly share code, notes, and snippets.

@jffkka
Created October 10, 2010 23:23
Show Gist options
  • Save jffkka/619680 to your computer and use it in GitHub Desktop.
Save jffkka/619680 to your computer and use it in GitHub Desktop.
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler</b>: <input
type="button" value="Show" style="width:45px;font-
size:10px;margin:0px;padding:0px;" onClick="if
(this.parentNode.parentNode.getElementsByTagName('div')
[1].getElementsByTagName('div')[0].style.display != '') {
this.parentNode.parentNode.getElementsByTagName('div')
[1].getElementsByTagName('div')[0].style.display = '';
this.innerText = ''; this.value = 'Hide'; } else {
this.parentNode.parentNode.getElementsByTagName('div')
[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText =
''; this.value = 'Show'; }">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
THIS TEXT IS HIDDEN
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment