Agent Moose
|
|
« on: November 07, 2008, 07:02:00 pm » |
|
Footers <script> var b = document.getElementsByTagName("div"); //Created by Agent Moose (smcodes.smfforfree3.com) for(x=0;x<b.length;x++){ if(b[x].className=="post" && b[x].innerHTML.match(/\[spoiler\](.*)\[\/spoiler\]/i)){ b[x].innerHTML = b[x].innerHTML.replace("[spoiler]" + RegExp.$1 + "[/spoiler]","<div><div><a href='javascript:void(0)' onclick='$(this).parent().next().toggle()'>(Click to Show/Hide Spoiler)</a></div><div style='display:none' id='spoiler'>" + RegExp.$1 + "</div></div>"); };}; </script> Just place [spoiler]YOUR TEXT HERE[/spoiler] to create the spoiler.
|
|
|
|
|
Spoken
Exclusive
Offline
Gender:
Posts: 454
Badges: (View All)
|
|
« Reply #1 on: November 08, 2008, 03:08:58 pm » |
|
Not sure if im right but, a spoiler is test that doesnt appear unless highlighted, no?
|
|
|
|
|
deathwilldie
|
|
« Reply #2 on: November 08, 2008, 03:25:14 pm » |
|
It will have a link that says click to show or hide. So the text will be hidden unless if you click on that link.
|
|
|
|
nickrulz1
|
|
« Reply #3 on: August 13, 2009, 01:51:33 pm » |
|
Great, just the code i was looking for thanks
|
|
|
|
Nick
Member
Offline
Gender:
Posts: 48
Badges: (View All)
|
|
« Reply #4 on: August 15, 2009, 11:34:57 am » |
|
I like this alot. Thanks Moose I just changed some of the things to make it an input button instead of text
|
|
|
|
|
|
|