How to keep menu active status while scrolling between section

306 Views Asked by At

The active menu status not working while scrolling between <section>. Is there any option in scrollMagic to set active status all the time while scrolling based on which <section> is .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);
});

Demo: http://codepen.io/mobrndstr/pen/pymGoQ

nav menu .active status removes in between two section while scrolling.


when <section class="feature" id="intro"> Section .setPin()

enter image description here


In between <section class="feature" id="intro"> to <section class="feature" id="feature"> active status gone

enter image description here


And .active statu<section class="feature" id="feature"> has set as setPin()

enter image description here

0

There are 0 best solutions below