Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/11/2008, 14:17
Avatar de marcopoloaz06
marcopoloaz06
 
Fecha de Ingreso: julio-2007
Ubicación: México
Mensajes: 457
Antigüedad: 16 años, 9 meses
Puntos: 11
Respuesta: [jQuery] parentNode

hola, eso es muy fácil
Código javascript:
Ver original
  1. $(document).ready(function(){  
  2.     $("table tr td").click(function(){
  3.         var $this = $(this);
  4.         var parent = $this.parent();
  5.         var color = parent.css("backgroundColor");
  6.         parent.css("backgroundColor", color=="red" ? "white" : "red" );
  7.     });
  8. });

saludos
:]
__________________
Aerolíneas Alicia :D