Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/01/2011, 14:28
Avatar de _cronos2
_cronos2
Colaborador
 
Fecha de Ingreso: junio-2010
Mensajes: 2.062
Antigüedad: 14 años, 9 meses
Puntos: 310
Problema con objeto en IE

Sigo teniendo problemas con IE . Tengo esta función, pero me dice que esperaba un objeto (en FF y Chrome sí funciona) :
Código Javascript:
Ver original
  1. // [...]
  2.   opacity : function(){
  3.    var isIE = document.all, estilos = isIE ? ['filter', 100] : ['opacity', 1], valor = isIE ? ['alpha(opacity=', ')'] : ['', ''];
  4.    alert(this.tagName); // undefined según IE ¬¬
  5.    if(arguments.length){
  6.     this.style[estilos[0]] = valor[0] + (arguments[0] * estilos[1]) + valor[1];
  7.    }else{
  8.     if(this.style[estilos[0]]){
  9.      return this.style[estilos[0]].match(/\d+(\.\d+)?/)[0]/estilos[1];
  10.     }else{
  11.      if(SS.find(this.tagName, isIE?'filter':'opacity')){
  12.       return isIE?SS.find(this.tagName, 'filter').match(/\d+(\.\d+)?/)[0]/100:SS.find(this.tagName, 'opacity');
  13.      }else{
  14.       if(SS.find('#'+this.id, isIE?'filter':'opacity'))
  15.        return isIE?SS.find('#'+this.id, 'filter').match(/\d+(\.\d+)?/)[0]/100:SS.find('#'+this.id, 'opacity');
  16.       else{
  17.        for(var i=0, partir=this.className.split(' '); clase=partir[i]; i++){
  18.         if(SS.find('.'+clase, isIE?'filter':'opacity'))
  19.          return isIE?SS.find('.'+clase, 'filter').match(/\d+(\.\d+)?/)[0]/100:SS.find('.'+clase, 'opacity');
  20.        }
  21.       }
  22.      }
  23.     }
  24.    }
  25.    return 1;
  26.   }
  27. // [...]
¿Alguien me puede ayudar?
Muchas gracias :D
__________________
" Getting older’s not been on my plans
but it’s never late, it’s never late enough for me to stay. "
Cigarettes - Russian Red