Team:Grenoble/script
From 2012.igem.org
(Difference between revisions)
Line 77: | Line 77: | ||
this.to=a!==undefined?a:1; | this.to=a!==undefined?a:1; | ||
var e=this.elem.style; | var e=this.elem.style; | ||
+ | var temp; | ||
if(!e.opacity){ | if(!e.opacity){ | ||
if(e.opacity!==0){ | if(e.opacity!==0){ | ||
- | + | temp=this.to>0?0:1; | |
}else{ | }else{ | ||
- | + | temp=parseFloat(e.opacity); | |
} | } | ||
}else{ | }else{ | ||
- | + | temp=parseFloat(e.opacity); | |
} | } | ||
- | this.from=(b===undefined? | + | this.from=(b===undefined?temp:b); |
d=d||{}; | d=d||{}; | ||
this.duration=d.duration||500; | this.duration=d.duration||500; |
Revision as of 08:51, 13 July 2012