On Wed, Apr 8, 2009 at 7:14 AM, TC <inscr...@gmail.com> wrote: > > Hi all, > > I'm new to Jquery and I have a problem I'd like to ask. I've followed > a code snippet online to add a background color to a table column, but > my problem is that when the 2nd row is selected, the 1st row > disappears. How can I make each row remain on the td I've selected? >
your click handler on the <td> element is doing this: $('td.selected').removeClass('selected'); that's removing the 'selected' class. get rid of that line, and the previously applied class will remain. note tho, that you have radio buttons... are you wanting people to be able to select more than 1 item from each group? if so, you'll want to go with checkboxes. -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.