Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/08/2012, 01:37
Avatar de dontexplain
dontexplain
 
Fecha de Ingreso: junio-2012
Mensajes: 536
Antigüedad: 11 años, 10 meses
Puntos: 127
Respuesta: Preload Imagen

Para jquery hay un plugin más certero para este "evento"

https://github.com/desandro/imagesloaded

Su uso es muy sencillo.

$("#imgBox").imagesLoaded(function($images, $proper, $broken){
if($broken == ""){
$("#divContenedor").animate({
width:$("#imgBox").width(),
height:$("imgBox").height()
});
}

})

Un saludo.
__________________
21añero.
HTML/CSS, PHP, JS/jQuery, Mysql; NodeJS/Socket.io (& V8); C++ ; Python (wxpy); Ensamblador.
Músico (clarinetista/pianista) y compositor