Re: jQuery Spoiler
Posted: 21 Aug 2010, 11:46
Yes, that one works.
But with input type="button" to give it the prosilver button look.
But with input type="button" to give it the prosilver button look.
Database and Demo for phpBB3 BBCodes, Mods and Smilies
https://phpbb3bbcodes.com/
Sure. Wait for it...Stoker ยป 21 Aug 2010, 11:46 wrote:Yes, that one works.
But with input type="button" to give it the prosilver button look.
Code: Select all
<dl class="codebox">
<dt>
<input type="button" value="[+]{INTTEXT} " onclick="var spoiler = this.parentNode.parentNode.getElementsByTagName('dd')[0]; if ( spoiler.style.display == 'none' ) { $(spoiler).slideDown(); $(spoiler).fadeIn('slow'); this.value = '[−]{INTTEXT}'; } else { $(spoiler).slideUp(); $(spoiler).fadeOut('slow'); this.value = '[+]{INTTEXT}'; };" />
</dt>
<dd style="display: none;">{TEXT}</dd>
</dl>
Code: Select all
<dl class="codebox">
<dt>
<input type="button" class="button2" value="[+]{INTTEXT} " onclick="var spoiler = this.parentNode.parentNode.getElementsByTagName('dd')[0]; if ( spoiler.style.display == 'none' ) { $(spoiler).slideDown(); $(spoiler).fadeIn('slow'); this.value = '[−]{INTTEXT}'; } else { $(spoiler).slideUp(); $(spoiler).fadeOut('slow'); this.value = '[+]{INTTEXT}'; };" />
</dt>
<dd style="display: none;">{TEXT}</dd>
</dl>