Click here to Skip to main content
13,043,898 members (47,223 online)
Rate this:
Please Sign up or sign in to vote.
Hi guys,

I wanna ask on how to create spoiler in email. I use mozilla thunderbird.
Here's the code i've tried :
<div id="spoiler" style="display:none"> 
Spoiler Content Here
<button title="Click to show/hide content" type="button" onclick="if(document.getElementById('spoiler').style.display=='none') {document.getElementById('spoiler').style.display=''}else{document.getElementById('spoiler').style.display='none'}">Show/hide</button>

Well, the result : button is good, but when i clicked the button nothing happened.
Is there anything wrong with my code?

many thanks
Posted 28-Nov-12 15:27pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


Is a simple code that would do the trick.
satrio_budidharmawan 2-Dec-12 22:39pm
well, i've tried it, but same result with my previous codes.
I suspected something wrong with Thunderbird since i've tried it with gmail and it worked.
TorstenH. 3-Dec-12 5:37am
might be that Thunderbird does not use JS there. Or is it restricted to the internet settings on MS? Might be switched off there.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 29 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100