OO em JS
Tenho o codigo que apresenta o erro no settimeout alguem pode me ajudar?
CODE
function fade(div){
this.d = document.getElementById(div);
this.ie = function(t) {
if (t == 'undefinid') t = 0;
t += 10;
if (t <= 100){
this.d.style.filter= 'alpha(opacity='+t+')';
setTimeout('this.ie('+t+')',10); //erro aqui
}else{
this.d.style.filter= 'alpha(opacity=100)';
}
}
this.moz = function(t){
if (t == 'undefinid') t = 0;
t += 0.10;
if (t <= 1){
this.d.style.MozOpacity = t;
setTimeout('moz('+t+')',10); // erro aqui tambem
}else{
this.d.style.MozOpacity = 1.0;
}
}
this.opacidade = function(){
if (document.all){
this.d.style.filter = 'alpha(opacity=0)';
this.ie(0);
}else{
this.d.style.MozOpacity = 0;
this.moz(0);
}
}
}Discussão (2)
Carregando comentários...