Click here to Skip to main content
15,880,364 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
Hi guys,

I wanna ask on how to create spoiler in email. I use mozilla thunderbird.
Here's the code i've tried :
HTML
<div id="spoiler" style="display:none"> 
Spoiler Content Here
</div> 
<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
-Y
Posted

1 solution

Here: http://www.dug-portal.com/2009/10/einfacher-javascript-spoiler.html[^]

Is a simple code that would do the trick.
 
Share this answer
 
Comments
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900