All you've done is copy this hack from MyBB
http://community.mybb.com/thread-703...hlight=spoiler
Compare the main code and see.
I used that hack before when I ran MyBB 1.4, so spotted this as looking the same right off. You've made a few changes that's all to suit vbulletin, but the main Spoiler Code used is exactly the same.
Your code:
Code:
<input type="button" value="$1" style="width:auto;font-size:12px;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 = '$3'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = '$1'; }" />
MyBB Code:
Code:
<input type="button" value="Show Spoiler" style="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'; }">