jQuery Spoiler

User submitted BBCodes
Let us see what You have
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]

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.

Re: jQuery Spoiler

Post by mctoms »

that's delicious!
thanks for add!

// Mc

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.

Re: jQuery Spoiler

Post by marc1706 »

I replaced the identifier with INTTEXT.

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]

Re: jQuery Spoiler

Post by Stoker »

Any idea how to do this with a button?

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!

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 ;)

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>

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>