MaggsWeb:7

www.maggsweb.com

This is used more and more to display more info, hidden fields, etc…
It could easily be improved with multiple divs stacked in the same place…
Hmmm…, now I am getting ideas.

?View Code JAVASCRIPT
function openCloseDiv( elementId ){
  var element = document.getElementById(elementId);
  if ( element.style.display == 'block' ) {
    element.style.display = 'none';
  } else {
    element.style.display = 'block';
  }
}

OK, Thats the function set up. Store this in javscript.js or something simillar…

<span title="Click here to display info..." onclick="openCloseDiv( 'DIVNAME' )">
	Blah Blah....
</span>
<div id="DIVNAME" style="display: none;">   // or when open, "display: block;"
	---DIV CONTENTS---</div>
Share this:
  • Print
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • Twitter

Write a Comment

Let me know what you think?