Hello, I have this table. I want to change the color of a cell, from black to red, when i move over that cell, I'm using the .hover method, and i'm having trouble figuring out how to make work accordingly to what i need.
<html>
<head>
<script type="text/javascript" src="jquery-1.4.js"></script>
<script>
$board = $('#board')
$(this).hover(function()
{
$('td').css('border-color', 'red');
},
function()
{
$('td').css('border-color', 'black')
})
</script>
<style type="text/css">
td
{
border-style:solid;
border-color:black;
}
</style>
</head>
<body>
<table id="board">
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<input type="button" value="Shuffle" onclick="change()"/>
</body>
</html>