SEO and Internet newsnews

Javascript - Background & Documents Effects

Showing & Hiding div box

Simply copy and paste the following code inside your body tags and run it from a browser.
If you want to see the live result (we believe this is the best way to learn what is the script about), try it here (new window).

This script shows the simplest way to handle this kind of behave, it's easy to add features such as displaying a + when the box is closed and a - once opened.

Comments

You don't need to select the divs with getElementsByTagname and then use bj[id] - instead simply use:

document.getElementById('whatever').style.visibility = 'visible';

etc.

Posted by Phil on wed 27th 2006

Post another comment

Add Url to Linkstraffic - Website traffic - Affiliates - Site Map