Ver Mensaje Individual
  #5 (permalink)  
Antiguo 12/12/2010, 10:29
Dany_s
 
Fecha de Ingreso: diciembre-2009
Ubicación: Misiones
Mensajes: 867
Antigüedad: 14 años, 5 meses
Puntos: 65
Respuesta: Jquery y Varios enlaces

Código HTML:
Ver original
  1.     <head>
  2.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  3.         <title>Prueba</title>
  4.         <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  5.         <script type="text/javascript">
  6.             $(function(){
  7.                 $('.borrar').click( function(){
  8.                     $(this).closest('tr').remove();
  9.                     return false;
  10.                 });
  11.             });
  12.         </script>
  13.         <style>
  14.  
  15.         </style>
  16.     </head>
  17.     <body>
  18.  
  19.     <table>
  20.         <tr>
  21.             <th>Nombre</th>
  22.             <th>Acciones</th>
  23.         </tr>
  24.         <tr>
  25.             <td>Prod1</td>
  26.             <td><a HREF="borrar.php?id=1" class="borrar">Borrar</a></td>
  27.         </tr>
  28.         <tr>
  29.             <td>Prod2</td>
  30.             <td><a HREF="borrar.php?id=2" class="borrar">Borrar</a></td>
  31.         </tr>
  32.         <tr>
  33.             <td>Prod3</td>
  34.             <td><a HREF="borrar.php?id=3" class="borrar">Borrar</a></td>
  35.         </tr>
  36.         <tr>
  37.             <td>Prod4</td>
  38.             <td><a HREF="borrar.php?id=4" class="borrar">Borrar</a></td>
  39.         </tr>
  40.     </table>
  41.  
  42.     </body>
  43. </html>

http://api.jquery.com/category/traversing/