Back to Modification Graveyard

jQuery Spoiler BB Code - Smooth Scrolling
Mod Version: 1.00, by 1Unreal

This thread is in the Modification Graveyard.
vB Version: 3.8.x Rating: (1 vote - 5.00 average) Installs: 6
Released: 09 May 2009 Last Update: Never Downloads: 1
Not Supported Template Edits External Content  

Ive not seen a very pretty spoiler BB code so I thought I would make one. It uses some really simple jQuery code so its very easy to modify with some other cool effects

http://www.theflickzone.com/tutorials/846-spoiler-bb-code.html#post1561

Also, its worth mentioning that if you users browser is slow at parsing javascript they might see the spoiler for a split second.

Anyway, heres how to install it.

Open up the template headinclude, go to the bottom and add this code

HTML Code:
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
	$(document).ready(function(){
		$("#spoilercontent").hide();
		$("#spoilerhead").click(function () {
			if ($("#spoilercontent").is(":hidden")) {
				$("#spoilercontent").slideDown("slow");
			} else {
				$("#spoilercontent").slideUp("slow");
			}
		});
	});
</script>
If you are using jQuery somewhere on your site already remove the first line

Next add a new BB code use what ever options you want, but use this for the HTML replacement:

HTML Code:
<div id="spoilerhead" class="thead">Spoiler</div> <div id="spoilercontent" class="alt1">{param}</div>
And youre done!

Download

No files for download.

Similar Mods

BB Code Enhancements Spoiler BB Code vBulletin 3.7 Add-ons
Mini Mods Better Spoiler bb code vBulletin 3.6 Add-ons

vblts.ru supports vBulletin®, 2022-2024