Yes, that one works.
But with input type="button" to give it the prosilver button look.
jQuery Spoiler
Forum rules
We dont add more BBCodes to our database, but feel free to share and support your own BBCodes here.
[textarea]Remember that it is not allowed to use {TEXT} inside the html tags!!!
It causes a serious security risk to your board and users.
Like this: <div style="{TEXT}">{TEXT}</div>
Green = OK - Red = forbidden[/textarea]
We dont add more BBCodes to our database, but feel free to share and support your own BBCodes here.
[textarea]Remember that it is not allowed to use {TEXT} inside the html tags!!!
It causes a serious security risk to your board and users.
Like this: <div style="{TEXT}">{TEXT}</div>
Green = OK - Red = forbidden[/textarea]
Re: jQuery Spoiler
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.
Re: jQuery Spoiler
Here:
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>
Re: jQuery Spoiler
you forgot the class="button2"

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>