Código HTML:
<html>
<head>
<title>Ejemplo</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<table width="500" border="1" cellspacing="0" cellpadding="4">
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<p>
<input type="button" id="firstColumn" value="prmera columna" />
<input type="button" id="secondColumn" value="Second Column" />
<input type="button" id="thirdColumn" value="Third Column" />
<input type="button" id="reset" value="reset" />
</p>
<script>
$(function(){
// Change first column background color.
$("#firstColumn").click(function(){
$("table tr td:first-child").css("background-color","#ff0000");
});
// Change second column background color.
$("#secondColumn").click(function(){
$("table tr td:nth-child(2)").css("background-color","#ff0000");
});
// Change third column background color.
$("#thirdColumn").click(function(){
$("table tr td:last-child").css("background-color","#ff0000");
});
// reset background color.
$("#reset").click(function(){
$("table tr td").css("background-color","transparent");
});
})
</script>
</body>
</html>