Hi can anyone tell me how to alter this script so it will works on
classes and id's;
<script>
function showhide(id){
if (document.getEl ementById){
obj = document.getEle mentById(id);
if (obj.style.disp lay == "none"){
obj.style.displ ay = "";
} else {
obj.style.displ ay = "none";
}
}
}
</script>
its called by;
<a href="javascrip t:void(0)" onmouseover="sh owhide('divname ')">
link</a>
<div style="display: none;" id="divname">
some content
</div>
I just need to make it work on div classes
classes and id's;
<script>
function showhide(id){
if (document.getEl ementById){
obj = document.getEle mentById(id);
if (obj.style.disp lay == "none"){
obj.style.displ ay = "";
} else {
obj.style.displ ay = "none";
}
}
}
</script>
its called by;
<a href="javascrip t:void(0)" onmouseover="sh owhide('divname ')">
link</a>
<div style="display: none;" id="divname">
some content
</div>
I just need to make it work on div classes
Comment