Author Topic: Diferent way to open the Spoiler  (Read 4537 times)

carlos.costa

  • Tadpole
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Diferent way to open the Spoiler
« on: May 14, 2014, 10:38:01 AM »
Hello, very useful plugin.
I wonder if it is possible, through a link, open the Spoiler easy.
Ex: I have two pages, and would like to via a link from one page to go directly to another page with the spoiler already open. How can I do this? Thanks for availability ...

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Diferent way to open the Spoiler
« Reply #1 on: August 19, 2014, 11:02:13 AM »
Hmmmm.....   Each spoiler has javascript method for opening and closing.  If you invoke that method (from anywhere) you should theoretically open it.  Look at the source of your HTML page with a spoiler and search for the spoiler text you specified (to help locate the HTML).  This will tell you the javascript methods.

In your link you can insert an action in javascript to perform when clicked.  There, invoke the spoiler open method (or toggle method).

 

anything