Moderators: Runic Games, Perfect World



TheAlien wrote:The annoying thing is that the code is written in JQuery, which is really obscure. Never worked with it. Give me any other JS code and (with time) I'll be able to track down the problem. This code is just...not readablex(
<div style="color:#d0d0d0; padding: 3px; background-color: #484848; border: 1px solid #757575; font-size: 1em;"><div style="text-transform: uppercase; border-bottom: 1px solid #757575; margin-bottom: 3px; font-size: 0.8em; font-weight: bold; display: block;"><span 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.innerHTML = '<b>Spoiler: </b><a href=\'#\' onClick=\'return false;\'>hide</a>'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerHTML = '<b>Spoiler: </b><a href=\'#\' onClick=\'return false;\'>show</a>'; }" /><b>Spoiler: </b><a href="#" onClick="return false;">show</a></span></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div>
<div style="color:#d0d0d0; padding: 3px; background-color: #484848; border: 1px solid #757575; font-size: 1em;"><div style="text-transform: uppercase; border-bottom: 1px solid #757575; margin-bottom: 3px; font-size: 0.8em; font-weight: bold; display: block;"><span 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.innerHTML = '<b>Spoiler: </b><a href=\'#\' onclick=\'return false;\'>hide</a>'; }else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerHTML = '<b>Spoiler: </b><a href=\'#\' onclick=\'return false;\'>show</a>'; }" /><b>Spoiler: </b><a href="#" onclick="return false;">show</a></div><div class="quotecontent"><div style="display: none;"><script type="text/javascript">var text = '{TEXT}'; text = text.replace("[spoiler]", ''); text = text.replace("[/spoiler]", ''); document.write(text);</script></div></div></div>
Users browsing this forum: No registered users and 1 guest