コードにちょっとした問題があります。「jq」という名前の、背景色が異なるクラス要素がたくさんあります。ホバー時に背景色をアニメーション化し、元の色に戻します。これは、.css('backgroundColor') がホバーされ、jq クラスを使用して指定された div の色を取得する場所です。代わりに、div の背景を白に戻します。これが私のコードです:
$(document).ready(function(){
$(".jq").hover(
var bgcol = $(this).css('backgroundColor');
function(){
$(this).animate({
backgroundColor: "#EAEAEA",
color:"#333"
},trans);
},
function() {
$(this).animate({
backgroundColor:'bgcol',
color:"#888"
},trans);
});
});