div display visible, fade opacity effect
hello everyone,
I've seen several scripts that let me fadein/fadeout a div using the opacity, the problem is that when a div has a 0% alpha, it still covers up the content (such as links) that is below it.
I need a function that will detect if the div is hidden, reveal it, and fade to 100% opacity. If the div is visible, fade out to 0% and set div to hidden.
psuedo:
-
if {
div style="display:none;";
display:visible, fade from 0 to 100% over 3000m/s
}
else{
fade from 100 to 0% over 3000m/s
setTimeout display:none
}
I know you can do it with if/else statements, but I am pretty poor with JS. I would prefer to just have one function for fade/out for simplicity, but a fadein function and a fadeout function would work.[/code]