Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/02/2012, 20:01
Avatar de Maganius
Maganius
 
Fecha de Ingreso: septiembre-2010
Mensajes: 310
Antigüedad: 13 años, 7 meses
Puntos: 10
Respuesta: varios forms mismo js

chicohot20

Mirando tu código y entendiendo lo que hicistes pude sacar algo mas sencillo lo pondre por si alguien le pasa lo mismo lo arregle así:

Código Javascript:
Ver original
  1. $('#envio')[I][B][COLOR="Red"].live("submit"[/COLOR][/B][/I],function(evento){
  2.           $("#cargando").css("display", "block");
  3.               $.ajax({
  4.                         type: "POST",
  5.                         url: $(this).attr('action'),
  6.                         data: $(this).serialize(),
  7.                         success: function(datos){
  8.                          $("#cargaMascota").html(datos);
  9.                          $("#cargando").css("display", "none");
  10.                         }
  11.                 });
  12.               alert($(this).serialize());
  13.               return false;
  14.        });

pinté en rojo lo que cambie. de esta forma cuando el DOM se actualize, "cuando agregue el siguiente formulario" con la función live de jquery funciona.