Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/04/2011, 11:39
Avatar de naitmeir
naitmeir
 
Fecha de Ingreso: junio-2008
Ubicación: Barcelona
Mensajes: 227
Antigüedad: 15 años, 11 meses
Puntos: 0
Respuesta: Loading effect con un gif en jquery

Ya encontre el modo:

Código HTML:
Ver original
  1.     <head>
  2.         <title>Ejemplo</title>
  3.         <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><script>
  4.         $(function(){            
  5.             $('#button').click(function(){
  6.                 alert("test");
  7.                 $('#prueba').html('<img src="preloader.gif" alt="cargando"/> Cargando... ').load('test.php');      
  8.                 return false;
  9.             });
  10.         });
  11.         </script>
  12.     </head>
  13.     <body>
  14.         <a href="#" id="button">test</a>
  15.         <div id="prueba" style="width:300px;height:300px;background:#ccc"></div>
  16.     </body>
  17. </html>