Tuesday, October 9, 2007

Javascript change element visibility

Want to change an element visibility from javascript. Here is an example.

document.getElementById("your_element_id").style.visibility = "hidden";
document.getElementById("your_element_id").style.visibility = "visible";

As you can see the visibility for an element can be hidden or visible. Make sure you have set an ID for your element.

No comments: