Menu
I’m new to Javascript and can’t figure out why the following basic stuff isn’t working:-
function fade(imgId)
{
var img;
img = document.images[imgId];
// alert(img.name);
img.opacity=0;
}
The function runs without error, the alert returns the correct image name when un-commented but the attempt to change the opacity to 0 has no effect on the image in the browser. Ultimately what I’m trying to do is to write a function that takes an image and fades it’s opacity over time, I want to be able to call it from the mouseover event of another image.
Any help would be much appreciated!