Hi, hope someone can help. I'm trying to change the visibility of text and an image on a gallery page. I have the following html code:
Code:
<img src="#" id="pic" style="visibility:hidden;" />
<p id="temptext" style="visibility:visible;">Please click a thumbnail....</p>
<div id="hide" style="visibility:hidden;">stuff to be hidden</div>
And have a function which displays the correct image and hides what needs to be hidden:
Code:
function showPic(i,x,y) {
....
document.getElementById('pic').style.visibility = "visible";
document.getElementById('temptext').style.visibility = "hidden";
document.getElementById('hide').style.visibility = "visible";
...
}
This works fine in FF but as per usual not in IE. I know the function is loading the image; its just not overwriting the visibility setting. I've tried adding the initial visibility style to the external style sheet instead of having it in the html code but it doesn't seem to make any difference. I've also tried setting the visibilities via an onload function, but that didn't work either! And i've tried using the display property instead of visibility.
Please help! Thanks for reading