Not sure what I’m doing wrong here. The interval doesn’t clear though and just continuously runs until the browser locks up.
the first function calls the setInterval and is only called once.
[code]
function fadeIn(id, speed)
{
window[id+’fade’] = setInterval(function() { increaseOpacity(id)}, speed); //i hate internet explorer
}
the second function is the function being called
[code]
function increaseOpacity(id)
{
var thelogo = document.getElementById(id);
if(thelogo)
{
thelogo.curOpacity+=.03;
if(thelogo.curOpacity >= 1)
{
window.clearInterval( [id+’fade’] );
}
var mozLevel = thelogo.curOpacity;
var ieLevel = (thelogo.curOpacity)*300; //300 instead of 100 because IE is sloooowwwww
if(ieLevel <= 100) thelogo.style.filter = “alpha(opacity=”+ieLevel+”)”;
thelogo.style.opacity = mozLevel;
} else window.clearInterval( [id+’fade’] );
}
Any insight on this would be much appreciated ?