CHANGE COLOR OF TABLE CELL - ONCLICK
Posted on 2003-11-20
This is probably very simple but I need an answer fast so the points are set at 500.
Can you please tell me how I can change the background color of a table cell by clicking on a link?
basically I have a link in a table cell and when that link is clicked I need the cell to change color and remain the new color until an alternative link is clicked (in the cell next door) when this happens the first cell needs to return to it's original color and the new cell needs to change color.
The color changes need to be permanent (until another link is clicked) i.e. when I click somewhere else on the page (linke a dropdown menu item) I don't want the table cell to return to it's original color.
I've tried to do this with a ":active" in CSS but the cell returns to i'ts original color whenever I click anywhere else on the page.
Your help would be greatly appreciated.