Log In · Register

 
Javascript expand/collapse
Clashing
post Aug 6 2007, 06:07 AM
Post #1


Senior Member
*****

Group: Member
Posts: 371
Joined: Jun 2007
Member No: 530,773



CODE
<script language="JavaScript" type="text/javascript">
function doMenu(item) {
obj=document.getElementById(item);
col=document.getElementById("x" + item);
if (obj.style.display=="none") {
  obj.style.display="block";
  col.innerHTML="[-]";
}
else {
  obj.style.display="none";
  col.innerHTML="[+]";
}
}
</script>


Ok, that's the code I got for the expand/collapse effect.

The problem is I need to know how to make it hidden to visitors when the page is loaded. So, like there would be only a title at first... Not a title plus the content including the link to collapse.
 
 
Start new topic
Replies
Clashing
post Aug 6 2007, 06:13 PM
Post #2


Senior Member
*****

Group: Member
Posts: 371
Joined: Jun 2007
Member No: 530,773



Ok, I guess no one knows much about Javascripts. Feel free to close. I'm gonna try to figure it out myself.
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: