I am trying to animate a change in backgroundColor using jQuery on mouseover.(我试图在鼠标悬停时使用jQuery动画化backgroundColor的变化。)
I have checked some example and I seem to have it right, it works with other properties like fontSize, but with backgroundColor I get and "Invalid Property" js error.(我检查了一些示例,似乎正确了,它可以与其他属性(例如fontSize)一起使用,但可以使用backgroundColor和“ Invalid Property” js错误。) The element I am working with is a div.(我正在使用的元素是一个div。)
$(".usercontent").mouseover(function() {
$(this).animate({ backgroundColor: "olive" }, "slow");
});
Any ideas?(有任何想法吗?)
ask by SteveCl translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…