본문 바로가기

javascript

Fade Table 효과

<SCRIPT language=JavaScript>
<!--
var tInC=null;
var tIdC=null;
var tIdCOn = new Array(0,0,0,0,0,0);
var tIdCOff = new Array(1,1,1,1,1,1);


function tBgFIn(obj, col,idNum) {
if(tInC != obj && tInC != null && tIdCOn[idNum] == 0) tBgFOut(tInC,tIdC);
if(tIdCOn[idNum] == 0) {
  tIdCOn[idNum] = 1;
  tIdCOff[idNum] = 0;
  tInC=obj;
  tIdC=idNum;
  changeColor(obj, col);
}
}
function tBgFOut(obj,idNum) {
if(tIdCOff[idNum] == 0) {
  tIdCOff[idNum] = 1;
  tIdCOn[idNum] = 0;
  changeColor(obj, "#ffffff");
}
}
function changeColor(obj, col) {
obj.filters.blendTrans.apply();
obj.style.backgroundColor= col;
obj.filters.blendTrans.play();
}
//-->

</SCRIPT></head>

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">

<p>  
<table border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="363" height="276" id="bgColorId1" style="BACKGROUND-COLOR: #ffffff; FILTER: blendTrans(duration=0.5)"
         onmouseover="tBgFIn(bgColorId1, '#EFF8E2',1)"><p> </td>
        <td width="363" height="276" id="bgColorId2" style="BACKGROUND-COLOR: #ffffff; FILTER: blendTrans(duration=0.5)"
         onmouseover="tBgFIn(bgColorId2, '#E5EDC3',2)"><p> </td>
    </tr>
    <tr>
        <td width="363" height="253" id="bgColorId3" style="BACKGROUND-COLOR: #ffffff; FILTER: blendTrans(duration=0.5)"
         onmouseover="tBgFIn(bgColorId3, '#188E95',3)"><p> </td>
        <td width="363" height="253" id="bgColorId4" style="BACKGROUND-COLOR: #ffffff; FILTER: blendTrans(duration=0.5)"
         onmouseover="tBgFIn(bgColorId4, '#EFF8E2',4)"><p> </td>
    </tr>
</table>