We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Smooth spoiler
Topic Started: Nov 10 2010, 06:10 PM (2,207 Views)
Xero
Member Avatar
Member
[ *  *  *  * ]
Here's a small and simple code that'll make the spoiler scroll when clicked. I thought it looked neater. ;)

Put this in the Javascripts section of your board template.
Code:
 
<script type="text/javascript">
$(function(){
$(".spoiler_toggle").unbind("click").live("click", function(){
$(this).next().slideToggle("slow");
});
});
</script>
Edited by Xero, Jun 8 2011, 07:44 PM.
Offline Profile Quote Post Goto Top
 
Axonite
Member Avatar
Just me...
[ *  *  *  * ]
Any Preview?
Offline Profile Quote Post Goto Top
 
Xero
Member Avatar
Member
[ *  *  *  * ]
Oh, hah. Sorry, forgot about that. :P

http://s4.zetaboards.com/Xero_Resources/topic/8136863/1/#post-8024743
Offline Profile Quote Post Goto Top
 
firegun
Member Avatar
Member
[ * ]
That cool... ^_^
Offline Profile Quote Post Goto Top
 
Pando
Member Avatar
Member
[ *  *  *  *  *  * ]
So simple, yet so innovative.

Can someone change the "slow" to a faster speed though? The slow speed is too slow...
Offline Profile Quote Post Goto Top
 
Xero
Member Avatar
Member
[ *  *  *  * ]
Sure. You can edit it any way you see fit. :P
Offline Profile Quote Post Goto Top
 
.awd (R)
Member Avatar
Member
[ *  *  * ]
I was about to say that is a bit slow. Could you tell me how
Offline Profile Quote Post Goto Top
 
Arly
Member Avatar
Member
[ *  *  * ]
Where it says slow, replace it with fast.
Offline Profile Quote Post Goto Top
 
Deleted User
Deleted User

Nice code Xero, looks elegant.
Quote Post Goto Top
 
ApexPalace
Member Avatar
I'm a newb.
[ *  * ]
Not working? Help?
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Works fine for me, you may have another code clashing with it.
Online Profile Quote Post Goto Top
 
extraordinary
Member
[ *  * ]
Awesome! Thanks!!
Offline Profile Quote Post Goto Top
 
SandyC (PM)
Member Avatar
Member
[ *  *  *  * ]
I've just added it to my test forum, it doesn't seem to work there either unfortunately :(

I only have the more fonts code and the latest topics in sidebar loaded in my test forum atm...
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Does it work on the preview board for you? What browser are you using? You get what the code does, yes?
Online Profile Quote Post Goto Top
 
SandyC (PM)
Member Avatar
Member
[ *  *  *  * ]
No go on the preview ether.. firefox 10.. yeap...
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply