これは重複としてクローズされる可能性が高いことはわかっていますが、同様の質問のすべてで私の問題に対する答えを見つけることができませんでした.
animate()
マウス ホバー時に (ご想像のとおり、jQuery を使用して) ページ上の要素を表示したい。私がしたことは:
$('blockquote').hover(function() {
console.log($(this));
$(this).animate({textSize: '+=10px'}, 500);
}, function() {
$(this).animate({textSize: '-=10px'}, 500);
});
はこれconsole.log
をログに記録します:
[blockquote#daily_quote, context: blockquote#daily_quote, jquery: "1.9.1", constructor: function, init: function, selector: ""…]
内部の両方の関数hover
が呼び出され、$(this)
ログに記録されますが、何もアニメーション化されません。