Skip to content

Instantly share code, notes, and snippets.

@kissgyorgy
Created January 2, 2013 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kissgyorgy/4433092 to your computer and use it in GitHub Desktop.
Save kissgyorgy/4433092 to your computer and use it in GitHub Desktop.
vBulletin 4.2 spoiler code
<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