Ver Mensaje Individual
  #6 (permalink)  
Antiguo 02/05/2012, 17:53
chinanzio
 
Fecha de Ingreso: marzo-2007
Mensajes: 82
Antigüedad: 17 años, 2 meses
Puntos: 21
Respuesta: No hay manera de añadir un efecto fade in

Asi ?

Código Javascript:
Ver original
  1. var xmlhttp = function() {
  2.     var a;
  3.     try {
  4.         a = new XMLHttpRequest();
  5.     } catch (e) {
  6.         try {
  7.             a = new ActiveXObject('Msxml2.XMLHTTP');
  8.         } catch (e) {
  9.             try {
  10.                 a = new ActiveXObject('Microsoft.XMLHTTP');
  11.             } catch (e) {
  12.                 alert('Your browser doesn\'t support ajax');
  13.                 a = false;
  14.             }
  15.         }
  16.     }
  17.     return a;
  18. };
  19. window.onload = function() {
  20.     var a = new comet();
  21. };
  22. var comet = function() {
  23.     var a = new xmlhttp();
  24.     a.open('post', window.location + "?" + Math.random() + "=" + Math.random(), true);
  25.     a.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  26.     a.onreadystatechange = function() {
  27.         if (a.readyState == 4) {
  28.             var content = document.getElementById('content');
  29.             $(content).fadeOut("slow", function() {
  30.                 content.innerHTML = a.responseText;
  31.                 $(content).fadeIn("slow", function() {
  32.                     window.setTimeout(function() {
  33.                         a = new comet();
  34.                     }, 1000);
  35.                 });
  36.             });
  37.         }
  38.     };
  39.     a.send('algo=algo');
  40. };
__________________
Hazle un favor a tu cerebro y juega Ajedrez online
Chess online