Tema: Metodo live
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/11/2011, 14:19
tumbero_x
 
Fecha de Ingreso: octubre-2010
Ubicación: Buenos Aires
Mensajes: 557
Antigüedad: 13 años, 6 meses
Puntos: 4
Metodo live

Hola Amigos!!
mi pregunta es la siguiente
porque si en una funcion agrego el metodo live funciona
Código Javascript:
Ver original
  1. $('.aplicar tbody tr').live('click',function(){
  2.                         if ($(this).hasClass('seleccionar'))
  3.                         {
  4.                             $(this).removeClass('seleccionar');
  5.                             var id = $(this).find("td").eq(4).html();
  6.                             //alert(id)
  7.                         }
  8.                         else
  9.                         {   if(!$(this).is('.desaplicar'))
  10.                             {
  11.                             $(this).addClass('seleccionar')
  12.                             var id = $(this).find("td").eq(4).html();
  13.                             alert(id)
  14.                             }
  15.                         }
en cambio asi no funciona
Código Javascript:
Ver original
  1. $('.aplicar tbody tr').click(function(){
  2.                         if ($(this).hasClass('seleccionar'))
  3.                         {
  4.                             $(this).removeClass('seleccionar');
  5.                             var id = $(this).find("td").eq(4).html();
  6.                             //alert(id)
  7.                         }
  8.                         else
  9.                         {   if(!$(this).is('.desaplicar'))
  10.                             {
  11.                             $(this).addClass('seleccionar')
  12.                             var id = $(this).find("td").eq(4).html();
  13.                             alert(id)
  14.                             }
  15.                         }
Muchas gracias!!!!