Hi frnds,
I m using the below code...it is working fine...nothing prob in it..
just i want change the visibility of that div....here by default div is visible...but i want default div should be hidden.....plz look into the below code..
<html>
<head>
<script language="javascript" type="text/javascript">
function showHideDiv()
{
var divstyle = new String();
divstyle = document.getElementById("div1").style.visibility;
if(divstyle.toLowerCase()=="visible" || divstyle == "")
{
document.getElementById("div1").style.visibility = "hidden";
}
else
{
document.getElementById("div1").style.visibility = "visible";
}
}
</script>
</head>
<body>
<div id="div1" class="divStyle">
Show Hide Div
</div>
<center>
<a href="#" onclick="showHideDiv()" >Click Here</a>
</center>
</body>
</html>