1(function($) { 2 $(function() { 3 initialize(); 4 }); 5 6 function initialize() { 7 $("#js-stickyPageNavMobBtn").on("click", function() { 8 $("#js-stickyPageNav").toggleClass("active"); 9 $("#js-stickyPageNav .inner") 10 .stop() 11 .slideToggle("active"); 12 }); 13 14 var controller = new ScrollMagic.Controller(); 15 $("section").each(function() { 16 var currentsection = this; 17 var duration = $(this).outerHeight(); 18 19 new ScrollMagic.Scene({ 20 triggerElement: currentsection, 21 offset: 200, 22 duration: duration 23 }) 24 .addTo(controller) 25 .on("enter", function(e) { 26 var triggerID = $(this.triggerElement()).attr("id"); 27 28 if (triggerID) { 29 var navtriggerID = 30 ".stickyPageNav.anchored .linkContainer a." + triggerID; 31 $("#js-stickyPageNav") 32 .find(".active") 33 .removeClass("active"); 34 $(navtriggerID).addClass("active"); 35 } 36 }); 37 }); 38 } 39})(window.jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.