Basically like the spolier:
for my comments thing...and full news..![]()
http://swindonsound.com/ss/shownews/

Basically like the spolier:
example
for my comments thing...and full news..![]()
http://swindonsound.com/ss/shownews/
Lmao:rolleyes:
PHP Code:<script language='JavaScript' type='text/javascript'>
<!--
function spoiler(obj)
{
for (var i = 0; i < obj.childNodes.length; i++)
{
if (obj.childNodes[i].id == 'idTitle')
titleRow = obj.childNodes[i];
if (obj.childNodes[i].id == 'idSpoiler')
{
if (obj.childNodes[i].style.display != 'none')
{
obj.childNodes[i].style.display = 'none';
titleRow.innerHTML = ' <b>Click to show spoiler</b>';
}
else
{
obj.childNodes[i].style.display = 'block';
titleRow.innerHTML = ' <b>Click to hide spoiler</b>';
}
}
}
}
//--></script>
:eusa_whisPHP Code:<div width="100%" class="alt1" onclick="spoiler(this);" style="border-collapse: collapse; border: solid thin black;"><div id="idTitle" class="alt2" style="border-collapse: collapse; border: solid thin black; width: 100%;"> <b>Click to show spoiler</b></div><div id="idSpoiler" style="display: none;">example</div></div><br />
Javascript file;
Javascript Include;Code:function simpletogglediv(whichLayer) { var theElementStyle = document.getElementById(whichLayer); if(theElementStyle.style.display == "block") { theElementStyle.style.display = "none"; } else { theElementStyle.style.display = "block"; } }
CSS Style Code;Code:<script type="text/javascript" src="filename.js"></script>
And more id's if you have more opening/closing divs on a page.Code:#one, #two, #three { display: none; }
The link to open/close the div;
The divs;Code:<a href="javascript:simpletogglediv('one');" title="link title"> Link name</a> <a href="javascript:simpletogglediv('two');" title="link title"> Link name</a> <a href="javascript:simpletogglediv('three');" title="link title"> Link name</a>
Code:<div id="one"> Content to open/close here. </div> <div id="two"> More Content to open/close here. </div> <div id="three"> Even more Content to open/close here. </div>
nice finding of the page source there kane, thanks tom ill try that later.
Want to hide these adverts? Register an account for free!