How do I create a spoiler tag?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tribedude
    Senior Member
    • Feb 2002
    • 326

    How do I create a spoiler tag?

    Like this one:

    Join the International Skeptics Forum to discuss and promote critical thinking across the planet.
  • Reeve of Shinra
    Senior Member
    • Sep 2001
    • 4325
    • 4.0.0

    #2
    Not sure who created it but here's the code...

    Title: Spoiler
    Tag: Spoiler

    Replacement:
    HTML Code:
    <div style="margin:20px; margin-top:5px"> <form> <div class="smallfont" style="margin-bottom:2px"><b>Spoiler:</b> <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onClick="javascript: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="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"> <div style="display: none;"> {param} </div> </div> </form> </div>
    Example:
    [spoiler]this should be hidden[/spoiler]

    Use Option: no
    Plan, Do, Check, Act!

    Comment

    • tribedude
      Senior Member
      • Feb 2002
      • 326

      #3
      I have tried the above and it puts a "show" button in nicely, but when the button's clicked , nothing is revealed...

      Comment

      • Reeve of Shinra
        Senior Member
        • Sep 2001
        • 4325
        • 4.0.0

        #4
        i beleive its a firefox / javascript blocking issue
        Plan, Do, Check, Act!

        Comment

        • Webmist
          Senior Member
          • Jan 2006
          • 132
          • 4.2.X

          #5
          You'd be better off adding it to the bb code.
          "You're just jealous because the voices only talk to me."

          Comment

          • studentsforum
            New Member
            • Feb 2007
            • 19
            • 3.6.x

            #6
            Originally posted by Webmist
            You'd be better off adding it to the bb code.
            adding what??
            could you help :S

            Comment

            Related Topics

            Collapse

            Working...