Show/Hide Boxes Broken [help]

TappedOut forum

Posted on June 5, 2015, 5:07 p.m. by PremiumCola

I've been trying to get the Spoiler boxes to work but for some reason when I save the line of code:
<button id="but.tutors" onclick="document.getElementById('div.tutors').style.display=''; document.getElementById('but.tutors').style.display='none';"> Show</button>
It breaks and only saves :
<button id="but.tutors"> Show</button>

I've gone to the point where I've edited the code manually in "inspect element" to see if the code actually works. The code definitely works, it just seems that tapped out doesn't save the "onclick" part.

Any help with fixing this would be greatly appreciated.

My complete set of code looks like this:
<button id="but.tutors" onclick="document.getElementById('div.tutors').style.display=''; document.getElementById('but.tutors').style.display='none';"> Show</button> <div id="div.tutors" style="display: none"><button onclick="document.getElementById('div.tutors').style.display='none'; document.getElementById('but.tutors').style.display='';"> Hide </button> <p>All content should be entered here</p> </div>

Kind Regards
PremiumCola

Epochalyptik says... #2

The code has probably been disabled for basic users.

June 5, 2015 5:16 p.m.

Here is the code that can be used by basic users for spoilers.

June 5, 2015 5:23 p.m.

PremiumCola says... #4

ahh well, worth a try. I do enjoy playing with my html.

Kind Regards
PremiumCola

June 5, 2015 5:27 p.m.

This discussion has been closed