jQuery Spoiler
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
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
- Stoker
- Site Admin
- Posts: 3536
- Joined: 12 May 2008, 23:26
- BBCodes: 239
- Favourite BBCode: Anipro
- Favourite MOD: PrettyPhoto
- Location: Denmark
- Contact:
Re: jQuery Spoiler
INTTEXT was introduced in 3.0.7:
[Feature] Add INTTEXT token type to custom bbcodes to allow non-ASCII letters in html attributes.
[Feature] Add INTTEXT token type to custom bbcodes to allow non-ASCII letters in html attributes.
Board rules! No PM support
-
- BBCoder I
- Posts: 2
- Joined: 02 Aug 2010, 00:01
- Location: http://www.dengo.pl
- Contact:
Re: jQuery Spoiler
that's delicious!
thanks for add!
// Mc
thanks for add!
// Mc
Re: jQuery Spoiler
Thanks Stoker,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.
So I guess I need to update then. I guess it's about time anyway.
Re: jQuery Spoiler
I replaced the identifier with INTTEXT.
Re: jQuery Spoiler
You mean that the title text is displayed as a button?Stoker » 20 Aug 2010, 22:14 wrote:Any idea how to do this with a button?
If so, I'm sure you can do it yourself!
- Stoker
- Site Admin
- Posts: 3536
- Joined: 12 May 2008, 23:26
- BBCodes: 239
- Favourite BBCode: Anipro
- Favourite MOD: PrettyPhoto
- Location: Denmark
- Contact:
Re: jQuery Spoiler
Nope, I dont know how to put both "a href" and "onclick" in a button.
Else I wouldnt ask
Else I wouldnt ask
Board rules! No PM support
Re: jQuery Spoiler
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
Wait, so you want the spoiler to open on button click or what?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
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 = ' [−] {INTTEXT}'; } else { $(spoiler).slideUp(); $(spoiler).fadeOut('slow'); this.innerHTML = '[+] {INTTEXT}'; };">
[+] {INTTEXT}
</button>
</dt>
<dd style="display: none;">{TEXT}</dd>
</dl>