TUTORIAL 03 –  VISIBILITY OF A DIV

 

TUTORIAL DESCRIPTION

 

In this tutorial, we will look at how to make a div visible/invisible.

 

MAKING A DIV VISIBLE

 

The div with id name fun will be set to visible with the following statement:

 

document.getElementById("fun").style.visibility = "visible";

 

MAKING A DIV INSIBILE

 

Here is the statement:

 

document.getElementById("fun").style.visibility = "hidden";

 

EXAMPLE

 

Click here to see this in action.  View source to see the code.