Питер Пеллер точечно, если вы еще не используете jQuery UI , тогда, по крайней мере, используйте цветной плагин jQuery .
Ниже приведен фрагмент кода, который я успешно выполнил во многих браузерах:
<a href="#" ID="fadeTable" title="click to fade col1">Click to fade Column 1</a>
<table width="400px" border="1" cellspacing="0" cellpadding="1"
summary="This is my test table">
<caption align="top">
My Caption
</caption>
<tr>
<th scope="col" class="row0 col1" >Col 1</th><th scope="col">Col 2</th>
</tr>
<tr>
<td class="row1 col1" >one</td><td>Uno</td>
</tr>
<tr>
<td class="row2 col1" >two</td><td>Dos</td>
</tr>
</table>
<script language="javascript" type="text/javascript">
$(document).ready(function(){
// requires http://dev.jquery.com/view/trunk/plugins/color/jquery.color.js
var iAniSpeed = 2000;
var sBgColor = 'gold';
$('#fadeTable').click(function(){
$('td.col1').animate( { backgroundColor: sBgColor }, iAniSpeed);
return false;
});
});
</script>
В качестве альтернативы вы можете сначала покрасить фон в его исходный цвет, а затем анимировать в новый цвет.
Чтобы это произошло, просто замените текущий блок анимации на что-то вроде этого:
$('td.col1').animate( { backgroundColor: 'white' }, 250, function()
{
$(this).animate( { backgroundColor: 'gold' }, 2000);
}
);