Quote:
Originally Posted by vasek
added custom title on button:
add new BB code:
Title: Spoiler with custom text on button
Tag: spoiler2
Code:
<div id="spoiler"><div><input type="button" value="{option}" style="width:160px;font-size:12px;margin:10px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '')
{
this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = '';
this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none';
this.innerText = '';
} else
{
this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none';
this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = '';
this.innerText = '';
}" />
<div id="show" style="display: none; background-color:transparent; background-repeat:repeat; margin: 0px;border-style:solid;border-width:1px; padding: 4px; width:98%">
{param}</div>
<div id="hide"></div></div></div>
sample: [spoiler2=text on button]hidden text[/spoiler2]
use option: On
|
I am using this one for the custom text on the button but after you press the button the text disappears and does not come back. Anyone have any ideas how I can get the text to stay after selected?