これは私がjQueryホバーを使用する方法です
hover( 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 が変更されるとホバー効果が機能しなくなることです。ライブメソッドがそのような問題を何度も解決したことは知っていますが、その場合はどうすれば解決できますか?