这是我如何使用jQuery hoverjQuery的悬停
悬停(handlerIn(eventObject)传递, handlerOut(eventObject)传递)
$(".box").each(function() {
var $this = $(this);
$this.data('baseColor', $this.css('background-color'));
$this.hover(function() {
$this.animate({
backgroundColor : "white"
}, 50);
}, function() {
$this.animate({
backgroundColor : $this.data('baseColor')
}, 50);
});
});
问题是当DOM改变悬停效果不再有效。我知道住方法多次为我解决了这样的问题,但我该如何解决它呢?
看看我的回答,我确定了问题,并且还将您链接到可能帮助您实现动画的脚本。 – Khez 2011-04-09 09:06:21