Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/05/2015, 07:18
Avatar de Andreslrz
Andreslrz
 
Fecha de Ingreso: septiembre-2008
Mensajes: 99
Antigüedad: 15 años, 8 meses
Puntos: 2
Diferencias checkbox dinamicos

Hola, tengo 2 tablas que se generan de forma dinamica, en las tablas cada fila tiene un checkbox. necesito diferencias los checkbox de cada tabla.

Con esto tomo el evento de los checkbox, pero necesito tomar los de una tabla en especifico.
Código Javascript:
Ver original
  1. $.post('../com/Ruta',
  2.     {
  3.         "accion":"facturas"
  4.     },
  5.     function(response) {
  6. $(':checkbox').change(function() {
  7.                 if($(this).is(":checked")) {
  8.                     buscarCambiosCliente($(this).val());
  9. //buscarCambios cliente es una función que me genera la tercer tabla.
  10.                     chekeds++;
  11.                 }else chekeds--;
  12.  
  13.                 if(chekeds > 0)
  14.                     $('#continuar').attr('disabled', false);
  15.                 else $('#continuar').attr('disabled', true);
  16.             });
  17. ]);
tabla1:
Código HTML:
Ver original
  1. <table class="table-scroll">
  2.                     <thead>
  3.                         <tr>
  4.                             <th>-</th>
  5.                             <th>Placa</th>
  6.                             <th>TIpo</th>
  7.                             <th>Remolque</th>
  8.                             <th>Peso</th>
  9.                             <th>Volumen</th>
  10.                         </tr>
  11.                     </thead>
  12.                     <tbody id="vehiculos-ruta" class="table-stripe">
  13.                     </tbody>
  14.                     <tfoot>
  15.                         <tr>
  16.                             <th>
  17.                                 <input type="button" id="ver-vehiculo" value="Ver"/>
  18.                             </th>
  19.                         </tr>
  20.                     </tfoot>
  21.                 </table>
tabla2
Código HTML:
Ver original
  1. <table class="table-scroll facturas-despacho">
  2.                     <thead>
  3.                         <tr>
  4.                             <th>-</th>
  5.                             <th>N&uacute;mero</th>
  6.                             <th>Cliente</th>
  7.                             <th>Domicilio</th>
  8.                             <th>Fecha</th>
  9.                             <th>Fecha Envio</th>
  10.                         </tr>
  11.                     </thead>
  12.                     <tbody id="facturas-ruta" class="table-stripe hover-row">
  13.                     </tbody>
  14.                     <tfoot>
  15.                         <tr>
  16.                             <th>
  17.                                 <input type="button" id="ver-factura" value="Ver"/>
  18.                             </th>
  19.                         </tr>
  20.                     </tfoot>
  21.                 </table>

Necesito saber los eventos de la segunda tabla, ya que al selecionar un checkbox de esta necesito cargar informacion extra que me genera la tercera tabla