Menu
is it possible to make a menu(using tables) fade-in instead of just appearing???
? A little more complicated!!!!!!!!!!!!!! ? [/QUOTE]
<i>
</i><html>
<head>
<title>Table Fade In And Out</title>
<style type="text/css"><!--
body{background:url(sample.jpg);/*background:url(<a href="http://www.geocities.com/caulolli/taylor.png">http://www.geocities.com/caulolli/taylor.png</a>);*/background-repeat:no-repeat;margin:0;}
#fader{z-index:1000;filter:alpha(opacity=0);background-color:#f00;width:100px;height:100px;}
--></style>
<script type="text/javascript"><!--
var steps=15; // How many steps would you like for fading?. Max is 100, min is 1.
var gap=75; // How long would you like the delay between each frame (in 1/1000 ths of a second)? Min is 1, max should be no more than 10000 (10 seconds).
var cont_fade_in="yes"; // Put "no" if you don't want it to follow on to fading in again.
var cont_fade_out="yes"; // Put "no" if you don't want it to follow on to fading out again.
var n=0;
var m=0;
var current="start";
steps=(steps<1 || steps>100)?15:Math.round(steps);
gap=(gap<1)?75:Math.round(gap);
function fade(){
m=Math.round(n/steps*100);
document.getElementById(elmnt).style.filter="alpha(opacity="+m+")";
n+=(current=="in")?1:(-1);
if(n<=steps || n>=0){setTimeout("fade()",gap);}
else if(n==steps+1){n-=2;current="end";}
else{n+=2;current="start";}}
function control_in(elmnt){
if(current=="start"){current="in";fade();}
else{current="in";}
}
function control_out(elmnt){
if(current=="end"){current="out";fade();}
else{current="out";}
}
//--></script>
</head>
<body>
<table id="fader">
<tr>
<td style="color:#ff0;">Hi There</td>
</tr>
</table>
<a href="#" style="display:block;width:100px;height:20;text-align:center;" onmouseover="control_in('fader');return true" onmouseout="control_out('fader');return true" onclick="return false;">Fading Table.</a>
</body>
</html>
0.1.9 — BETA 5.18