Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/06/2012, 15:48
Avatar de aldo1982
aldo1982
 
Fecha de Ingreso: noviembre-2004
Ubicación: Santa Fe (Argentina) Colon F.C
Mensajes: 1.362
Antigüedad: 19 años, 5 meses
Puntos: 6
De acuerdo Respuesta: Cargar un gif de Loading mientras carga una imagen

en el <head>

Código HTML:
<script>
	$(document).ready(function(){
		$("preload_img").each(function(){
				$(this).hide();
				$(this).load(function(){
					$(this).width($(this).parent().width()).height($(this).parent().height());
					$(this).fadeIn("slow");
				});
		});		
	});
	</script>

<style type="text/css">
	.div {
		background-image:url('images/loading.gif');
		background-repeat:no-repeat; background-position:center center;        
	}
	.div img   {width:inherit; height:inherit;}	
	</style> 

en el <body>

Código HTML:
<div> <img class="preload_img" src="tuImagen.jpg"> </div> 
__________________
LA MUERTE ESTÁ TAN SEGURA DE VENCER QUE NOS DA TODA UNA VIDA DE VENTAJA