I try use Scrolltomagic to scroll section when trigger is activated.
var sceneOptions2 = {duration: 500};
var divfocus = $("div.wrapper section");
when the section is activated it should go up to the top of the page. But scrolling donts works.
new ScrollScene(sceneOptions2)
.addTo(controller)
.triggerHook("onCenter")
.triggerElement(divfocus[1])
.setTween(TweenMax.to(divfocus[1], 2, {scrollTo:{y:50}, ease:Back.easeOut}));
How can make the section go to top when it is activated by the trigger?
complete code: http://jsfiddle.net/thallysondias/14ktjsb7/4/
ps: Any suggestion for optmize my code, maybe a clean way