Problema con spoilers uno abre el otro no

  • Autor Autor yagami
  • Fecha de inicio Fecha de inicio
yagami

yagami

Épsilon
Verificado
Verificación en dos pasos activada
Verificado por Whatsapp
Hola

en mi foro hay un problema con los spoilers que intento abrir un spoiler en un tema solo funciona el primero y el segundo también me abre el primero, ejm:

Prueba 1


Prueba 2 (Este no me abre)

Como Arreglo ese problema del spoiler ?
o mejor sii me recomiendan un boton poiler mas bonito...

http://www.foromundoanime.com/showthread.php?t=4537

Gracias
 
Hola yagami

He estado probando y veo que sí funcionan correctamente, solo que cuando pone "Mostrar" debería poner "Ocultar", por lo demás va bien, si pulso el primero abre el primero y si pulso el segundo abre el segundo

De todas formas te puedo dejar el que yo tengo, es muy parecido al tuyo pero retocado, va con {option}

Etiqueta: SPOILER

Código de Reemplazo:
HTML:
<span style="display: inline-block;">
<div style="margin:5px; border:1px solid #ccc;padding:5px;min-width:450px;box-shadow:inset -2px -2px 7px #bbb;border-radius:6px" align="left">
    <div class="smallfont" style="margin-bottom:2px; width:852; height:26;tex-align:center;">
    <input type="button" value="Mostrar: {option}" style="min-width:140px;margin:0px;padding:3px 8px 3px 8px;font:italic 12px Georgia, Verdana, Geneva, sans-serif;color:#097001;font-weight: bold;" onClick="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 = 'Ocultar: {option}'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Mostrar: {option}'; }">
    </div>
    <div class="" style="margin: 0px; padding: 6px; border: 0px;">
    <div style="display: none;margin:0px; border:0px solid #999;padding:5px;">
    {param}
    </div>
    </div>
<div style="position:relative;float:right;font:italic 9px Georgia, Verdana, Geneva, sans-serif;color:#666;font-weight: bold;bottom:8px;">Creaciones PPK</div>
    </div>
</span>

Ejemplo: [noparse]
Contenido
[/noparse]


Usar {option}: Si

============================

Si no quieres usar {option}, el código de reemplazo sería este:
HTML:
<span style="display: inline-block;">
<div style="margin:5px; border:1px solid #ccc;padding:5px;min-width:450px;box-shadow:inset -2px -2px 7px #bbb;border-radius:6px" align="left">
    <div class="smallfont" style="margin-bottom:2px; width:852; height:26;tex-align:center;">
    <input type="button" value="Mostrar" style="min-width:140px;margin:0px;padding:3px 8px 3px 8px;font:italic 12px Georgia, Verdana, Geneva, sans-serif;color:#097001;font-weight: bold;" onClick="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 = 'Ocultar'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Mostrar'; }">
    </div>
    <div class="" style="margin: 0px; padding: 6px; border: 0px;">
    <div style="display: none;margin:0px; border:0px solid #999;padding:5px;">
    {param}
    </div>
    </div>
<div style="position:relative;float:right;font:italic 9px Georgia, Verdana, Geneva, sans-serif;color:#666;font-weight: bold;bottom:8px;">Creaciones PPK</div>
    </div>
</span>

Puedes retocarlo a tu gusto y necesidades 😉

Un saludo
 
Atrás
Arriba