I wrote a code that i want to fade a <div> tag with. Here's the <div> tag.
<div id="about" onmouseover="fadein('about');"><li><a href="">About</a>
<ul class="navbar" id="aboutoptions">
<li><a href="aboutus.html">Us</a></li>
<li><a href="aboutproj.html">Projects</a></li>
</ul>
</li></div>
Here's my java code.
function fadein(objectID){
object = document.getElementById(objectID);
object.style.opacity = '0';
animatefadein();
function animatefadein(){
if(object.style.opacity < 1){
var current = object.style.opacity;
var newopac = current + .1;
object.style.opacity = newopac + ' ';}
}
setTimeout('animatefadein()', 1000);
}
it goes through, sets the <div> opacity to zero, then goes through the animate function and sets it to .1 succesfully, but won't seTimeout and go back through. Does anyone know what i can do? Let's forget IE for a while though, i realize they don't use the opacity tag but just ignore it for now.