Ver Mensaje Individual
  #21 (permalink)  
Antiguo 11/10/2012, 15:18
Avatar de satjaen
satjaen
 
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 7 meses
Puntos: 10
Respuesta: Imagen animada al llamar al servidor

Algo así:

Código Javascript:
Ver original
  1. $(function(){
  2. $('button').click(function(){



o así:

Código Javascript:
Ver original
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src="jquery.js"></script>
  5. <script>
  6. $(document).ready(function(){
  7.   $("div").ajaxStart(function(){
  8.     $(this).html("<img src='demo_wait.gif' />");
  9.   });
  10.   $("button").click(function(){
  11.     $("div").load("demo_ajax_load.asp");
  12.   });
  13. });
  14. </script>
  15. </head>
  16. <body>
  17.  
  18. <div><h2>Let AJAX change this text</h2></div>
  19. <button>Change Content</button>
  20.  
  21. </body>
  22. </html>


Última edición por satjaen; 11/10/2012 a las 15:27