D
dylanb
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.getElementById){
obj = document.getElementById(id);
if (obj.style.display == "none"){
obj.style.display = "";
} else {
obj.style.display = "none";
}
}
}
</script>
its called by;
<a href="javascript:void(0)" onmouseover="showhide('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.getElementById){
obj = document.getElementById(id);
if (obj.style.display == "none"){
obj.style.display = "";
} else {
obj.style.display = "none";
}
}
}
</script>
its called by;
<a href="javascript:void(0)" onmouseover="showhide('divname')">
link</a>
<div style="display: none;" id="divname">
some content
</div>
I just need to make it work on div classes