ユーザーが別の場所にいるときに特定の要素の動きをトリガーするために、ウェイポイント ( http://imakewebthings.com/jquery-waypoints/#shortcuts-examples ) と greensock ( http://www.greensock.com/ ) を使用しています。視差ページのレベル。
function mover(speed, targetx, targety) {
TweenMax.to($(".four"), speed, {x:targetx, y:targety});
console.log("waypoint reached");
alert("Down")
}
によって呼び出されます:
$(".three").waypoint(mover($(".four"), 1, 32, 32));
ただし、JavaScriptコンソールはこのメッセージを表示し続けます(すべてが視覚的に完全に機能しているにもかかわらず)
Uncaught Error: jQuery Waypoints needs a callback function or handler option. jquery.js:4
x.extend.error jquery.js:4
$.fn.(anonymous function) waypoints.js:360
(anonymous function) scroll.js:15
c jquery.js:4
p.fireWith jquery.js:4
x.extend.ready jquery.js:4
q
「true」を返そうとしましたが、エラーは消えません。コールバック関数またはハンドラー オプションを関数に統合するにはどうすればよいですか?