3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Taywin
0

You can use Javascript to collapse and hide the section (probably stored as DIV) and just add an event handler on the image link.

Something like:

function collapseExpand()
{
  if(document.getElementById("divToShowOrHide").style.display==="none")
  {
    document.getElementById("divToShowOrHide").style.display="block";
  }
  else
  {
    document.getElementById("divToShowOrHide").style.display="none";
  }
}

That's the very basic of the code. I'll let you figure out the rest =o)

0

Manipulating with 'display' property alone may not achieve what you want because the element area will still be preserved in the display but not visible to the client. In other word, it will still have an empty area for you after it has been display once even though it is now invisible.

If you want to show/hide, use CSS class with 'display' and 'visibility' properties in it. The reason you should use CSS class because using JS to manipulate 'visibility' property does not work in IE. Unless you are expecting your page to be used in other browsers which are not IE.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.