Is it possible that the user could select any column of the table and that I could do it using jQuery?
I have an example for the game: http://jsbin.com/oluyex/1/edit
Jquery I do not know how to choose the children of each of them:
$(function(){ $("th").click(function(){ $(this).("children").css("background-color","red"); }); })
HTML:
<table id="taula" border="1"> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>
source share