スライドショーを表示するオブジェクトを定義しました。次に、レンダリングメソッドの単純化バージョンを示します。JQuery:マウスオーバーでアニメーションループを停止するにはどうすればいいですか? (オブジェクト指向)
私の問題は、startLoopメソッドで実行されているすべてのアニメーションを停止したいということです。しかし、私はそれを理解していない。
// Render display
this.render = function() {
...
MAKE HTML WITH SLIDESHOW
...
// Start the loop
this.startLoop();
// Stop on hover
$('#display' + this.id).hover(function() {
this.animate.stop(); // Doesn't work
}, function() {
// Here should continue the animation
});
}
// Loop Slides
this.startLoop = function() {
...
ANIMATIONS HERE
...
}
ありがとうございました。
コードを簡略化しました。 'startLoop'には何がありますか? –