jQuery - OnClick, change background color for table cells
Posted
by
andrew
on Stack Overflow
See other posts from Stack Overflow
or by andrew
Published on 2010-12-28T01:33:07Z
Indexed on
2010/12/28
1:54 UTC
Read the original article
Hit count: 263
Hi all,
Let me show you a demo: here
it is working for only rows. its not working for cells. i want to change cells' (tds') background colors with mouse clicks.
For example: a have a table, and it has 4 tds. table's background color is white. if i click to a td, a td should be red, than if i click to b, b td should be red and a td should be white again. if i click to c than, c should be red and b should be white right now.
A - B
C - D
Can anyone help me?
© Stack Overflow or respective owner