22.10.2014, 14:53
Da ich jetzt hier antworten kann, nochmal die Vorgehensweise für alle.
Es ist meiner Meinung nach nicht die optimale Lösung (hätte es eher per CSS gelöst) aber es funktioniert:
Es ist meiner Meinung nach nicht die optimale Lösung (hätte es eher per CSS gelöst) aber es funktioniert:
Code:
<div>
<input type="button" value="" style="background:url(images/postbit_spoiler.gif) no-repeat;width: 58px;height: 20px;margin-bottom: 5px;border: none;" 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 = ''; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = '';}">
</div>
<div>
<div style="background: #ddd;margin: 0 15px 15px 15px;padding: 5px;border: 1px solid #858585;display: none;">
$1
</div>
</div>
</div>