You are really fast!!! Thank you. This is the problem. A minute after I posted I realized my mistake, but could not stop the post...
On Jan 17, 4:35 pm, "Mauricio \(Maujor\) Samy Silva" <css.mau...@gmail.com> wrote: > You missed a # in the color sintax: > $(this).css('background-color', '000000'); > Should be: > $(this).css('background-color', '#000000'); > > -----Mensagem Original----- > De: "Ron" <ron.ce...@gmail.com> > Para: "jQuery (English)" <jquery-en@googlegroups.com> > Enviada em: sábado, 17 de janeiro de 2009 22:13 > Assunto: [jQuery] Changing bg color of cell does not work in firefox 3 > (works in ie7) > > > > > > > When I click on the green cell (td.commsion), its color changes to > > black. It works fine in IE. > > In FF the bg color does not change (I do see the console.log message). > > Any idea why? > > > Here's the code: > > <script src="../js_lib/jquery-1.2.6.min.js" type="text/javascript" > > charset="utf-8"></script> > > > <script type="text/javascript"> > > $(document).ready(function() { > > $("td.commision").click(function(){ > > if (window.console) { > > console.log("Changing td color!"); > > } > > $(this).css('background-color', '000000'); > > }); > > }); > > </script> > > </head> > > > <body> > > <table style="border-style:solid; border-width:1px; border- > > color:#000";> > > <tr> > > <td> </td> > > <td class="commision" style="background-color:#0F0"> </td> > > <td> </td> > > </tr> > > <tr> > > <td> </td> > > <td> </td> > > <td> </td> > > </tr> > > </table> > > > </body>- Hide quoted text - > > - Show quoted text -