Ver Mensaje Individual
  #6 (permalink)  
Antiguo 09/11/2014, 16:15
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: Problema con Visibility y Display en JS

algunos días se aprende algo

mi respuesta venía dada a esto
Cita:
Iniciado por s3t3r Ver Mensaje
por ejemplo, si agrego esta función al JS con un alert, al iniciar el sitio me devuelve vacio pero sin ningún error, la función seria


Código:
window.onload = function(){ alert(document.getElementById('contenedor').style.visibility)}
Es un error muy extraño y muy difícil de expresar, sepan disculpar.

Desde ya muchas gracias!
Cita:
window.onload = function(){
console.log(document.getElementById('contenedor'). style.visibility); // vacío
console.log(window.getComputedStyle(document.getEl ementById('contenedor'))['visibility']); // hidden
}
por cierto el nombre de la propiedad height la tienes mal escrita
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}