間をスクロールしている間、アクティブなメニュー ステータスが機能しない<section>
。<section>
に基づいてスクロールしている間、スクロールマジックに常にアクティブステータスを設定するオプションはあります.setPin()
か?
var controller = new ScrollMagic.Controller({
globalSceneOptions: {
duration: $('section').height(),
triggerHook: .025,
reverse: true
}
});
$("section").each(function() {
new ScrollMagic.Scene({
triggerElement: this,
duration: '50%',
triggerHook: 0.025,
reverse: true
})
.setPin(this)
.addTo(controller);
});
デモ: http://codepen.io/mobrndstr/pen/pymGoQ
ナビゲーション メニュー.active
のステータスは、スクロール中に 2 つのセクションの間で削除されます。
<section class="feature" id="intro">
セクション_.setPin()
アクティブ状態に<section class="feature" id="intro">
なるまでの間<section class="feature" id="feature">
そして.active
ステータス<section class="feature" id="feature">
は次のように設定されていますsetPin()