Oblivion Knight
03-30-2005, 04:50 PM
I'm trying to make a spoiler tag similar to one that I used back in the UBB days.. I've succeeded to an extent, but maybe someone will be able to help me.
This is my Replacement HTML:
<div style="margin:20px; margin-top:5px; ">
<table width="100%" border="0" align="center" cellpadding="6" cellspacing="0">
<tr>
<td><fieldset><legend>spoiler (<a href="#" onclick="spoiler.className='showspoiler'; return false;" ondblclick="spoiler.className='spoiler'; return false;">click to view</a>)</legend><span id="spoiler" class="spoiler">Spoiler example..</span></fieldset></td>
</tr>
</table>
</div>The css attributes have been defined under "Additional CSS Definitions" as:
.spoiler { visibility: hidden; }
.showspoiler { visibility: visible; }This works almost as intended with Internet Explorer, though it doesn't work at all with Firefox..
Ideally, I'd like to click the link once to display the spoiler and then once again to hide it. The main issue that I'm having with Internet Explorer is when more than one post on a page uses the spoiler tag, it then ceases to function.. I imagine that I'd have to use some kind of $post[postid] variable with it? Firefox just never displays the spoiler in the first place after clicking the link..
This is my Replacement HTML:
<div style="margin:20px; margin-top:5px; ">
<table width="100%" border="0" align="center" cellpadding="6" cellspacing="0">
<tr>
<td><fieldset><legend>spoiler (<a href="#" onclick="spoiler.className='showspoiler'; return false;" ondblclick="spoiler.className='spoiler'; return false;">click to view</a>)</legend><span id="spoiler" class="spoiler">Spoiler example..</span></fieldset></td>
</tr>
</table>
</div>The css attributes have been defined under "Additional CSS Definitions" as:
.spoiler { visibility: hidden; }
.showspoiler { visibility: visible; }This works almost as intended with Internet Explorer, though it doesn't work at all with Firefox..
Ideally, I'd like to click the link once to display the spoiler and then once again to hide it. The main issue that I'm having with Internet Explorer is when more than one post on a page uses the spoiler tag, it then ceases to function.. I imagine that I'd have to use some kind of $post[postid] variable with it? Firefox just never displays the spoiler in the first place after clicking the link..