dyerware

Support => Wordpress Plugins => Topic started by: carlos.costa on May 14, 2014, 10:38:01 AM

Title: Diferent way to open the Spoiler
Post by: carlos.costa 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 ...
Title: Re: Diferent way to open the Spoiler
Post by: doug@dyerware.com 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).