jQuery Spoiler

User submitted BBCodes
Let us see what You have
There is no support here! Only Read Access!
Forum rules
We dont add more BBCodes to our database, but feel free to share and support your own BBCodes here.
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
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: jQuery Spoiler

Post by Stoker »

Yes, that one works.
But with input type="button" to give it the prosilver button look.
Board rules! No PM support
KukY13
BBCoder III
BBCoder III
Posts: 96
Joined: 26 Jun 2010, 16:23
Contact:

Re: jQuery Spoiler

Post by KukY13 »

Stoker » 21 Aug 2010, 11:46 wrote:Yes, that one works.
But with input type="button" to give it the prosilver button look.
Sure. Wait for it...
Image
KukY13
BBCoder III
BBCoder III
Posts: 96
Joined: 26 Jun 2010, 16:23
Contact:

Re: jQuery Spoiler

Post by KukY13 »

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 = '[&minus;]{INTTEXT}'; } else { $(spoiler).slideUp(); $(spoiler).fadeOut('slow'); this.value = '[+]{INTTEXT}'; };" />
</dt>
<dd style="display: none;">{TEXT}</dd>
</dl>
Image
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 848
Joined: 05 Mar 2010, 01:10
BBCodes: 2000
Favourite BBCode: p**n tube
Favourite MOD: Non of Stokers

Re: jQuery Spoiler

Post by Steve »

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 = '[&minus;]{INTTEXT}'; } else { $(spoiler).slideUp(); $(spoiler).fadeOut('slow'); this.value = '[+]{INTTEXT}'; };" />
</dt>
<dd style="display: none;">{TEXT}</dd>
</dl>
Steve wrote: 14 Nov 2024, 16:45 It's happy bastard day!
Locked