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: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: jQuery Spoiler

Post by Stoker »

INTTEXT was introduced in 3.0.7:
[Feature] Add INTTEXT token type to custom bbcodes to allow non-ASCII letters in html attributes.
Board rules! No PM support
mctoms
BBCoder I
BBCoder I
Posts: 2
Joined: 02 Aug 2010, 00:01
Location: http://www.dengo.pl
Contact:

Re: jQuery Spoiler

Post by mctoms »

that's delicious!
thanks for add!

// Mc
User avatar
Stitch
BBCoder II
BBCoder II
Posts: 28
Joined: 06 Mar 2010, 06:08

Re: jQuery Spoiler

Post by Stitch »

Stoker » 01 Aug 2010, 18:51 wrote:INTTEXT was introduced in 3.0.7:
[Feature] Add INTTEXT token type to custom bbcodes to allow non-ASCII letters in html attributes.
Thanks Stoker,
So I guess I need to update then. I guess it's about time anyway.
Image
User avatar
marc1706
BBCoder II
BBCoder II
Posts: 8
Joined: 14 Apr 2010, 11:17

Re: jQuery Spoiler

Post by marc1706 »

I replaced the identifier with INTTEXT.
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: jQuery Spoiler

Post by Stoker »

Its nice :
[spoilerjq=A smilie]8-)

8-) 8-)

8-) 8-) 8-)

8-) 8-) 8-) 8-)

8-) 8-) 8-) 8-) 8-)

8-) 8-) 8-) 8-) 8-) 8-)

8-) 8-) 8-) 8-) 8-) 8-) 8-)

8-) 8-) 8-) 8-) 8-) 8-) 8-) 8-)[/spoilerjq]
Board rules! No PM support
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: jQuery Spoiler

Post by Stoker »

Any idea how to do this with a button?
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 » 20 Aug 2010, 22:14 wrote:Any idea how to do this with a button?
You mean that the title text is displayed as a button?
If so, I'm sure you can do it yourself!
Image
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: jQuery Spoiler

Post by Stoker »

Nope, I dont know how to put both "a href" and "onclick" in a button.
Else I wouldnt ask ;)
Board rules! No PM support
Ather
BBCoder II
BBCoder II
Posts: 14
Joined: 09 Apr 2010, 18:27

Re: jQuery Spoiler

Post by Ather »

an Example of spoiler in Button :

Code: Select all

<div style="margin:20px; margin-top:5px"><div class="quotetitle"><input class="button2 btnlite" type="button" value="Show" style="text-align:center;width:100px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';      this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" /></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div>
KukY13
BBCoder III
BBCoder III
Posts: 96
Joined: 26 Jun 2010, 16:23
Contact:

Re: jQuery Spoiler

Post by KukY13 »

Stoker » 21 Aug 2010, 09:18 wrote:Nope, I dont know how to put both "a href" and "onclick" in a button.
Else I wouldnt ask ;)
Wait, so you want the spoiler to open on button click or what?
This way a button is displayed:

Code: Select all

<dl class="codebox">
<dt>
<button onclick="var spoiler = this.parentNode.parentNode.getElementsByTagName('dd')[0]; if ( spoiler.style.display == 'none' ) { $(spoiler).slideDown(); $(spoiler).fadeIn('slow'); this.innerHTML = ' [&minus;] {INTTEXT}'; } else { $(spoiler).slideUp(); $(spoiler).fadeOut('slow'); this.innerHTML = '[+] {INTTEXT}'; };">
[+] {INTTEXT}
</button>
</dt>
<dd style="display: none;">{TEXT}</dd>
</dl>
Image
Locked