Created
January 2, 2013 08:47
-
-
Save kissgyorgy/4433092 to your computer and use it in GitHub Desktop.
vBulletin 4.2 spoiler code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="margin:10px; margin-top:5px"> | |
<div style="margin-bottom:2px"> | |
<b>Spoiler</b>: <input class="button" type="button" value="Mutat" onclick="rejt(this)"> | |
</div> | |
<div style="margin: 0px; padding: 6px; border: 1px inset;"> | |
<div class="spoiler" style="visibility: hidden;"> | |
{param} | |
</div> | |
</div> | |
</div> | |
<script> | |
function rejt(gomb){ | |
tag = gomb.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0]; | |
if (tag.style.visibility != 'visible') { | |
tag.style.visibility = 'visible'; | |
this.innerText = ''; | |
gomb.value = 'Rejt'; | |
} | |
else { | |
tag.style.visibility = 'hidden'; | |
this.innerText = ''; | |
gomb.value = 'Mutat'; | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment