3

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

Mo.
  • 26,306
  • 36
  • 159
  • 225
  • @thepio please give me 1min let me update to the question – Mo. May 18 '16 at 11:17
  • Yep, I will follow this post. – thepio May 18 '16 at 11:19
  • Yes I understand your problem. Let me take a look :) – thepio May 18 '16 at 11:43
  • @thepio I do appreciate your help – Mo. May 18 '16 at 11:44
  • I'm sorry but I had to leave to do other things yesterday and came back this morning and tried it one more time. I think there needs to be a lot of changes (if I'm not missing something obvious) to the code to be able to get it to work the way you want it to. I might take a look at a solution later on today if someone has not got you an answer already. – thepio May 19 '16 at 06:17

0 Answers0