Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 86170

Re: greensock scrolling div

$
0
0

Here is the version with no div and using stage - same link updated:  https://app.box.com/s/y0ih2sydi53hberd7ipw

the new code is:

var container = sym.$('container');

// Hide an element

sym.$("container").css({'position':'fixed'});

var stage = sym.$('Stage');

stage.css({'position':'fixed'});

sym.$("button1").bind('click', { id: ".box7" }, scroller);

sym.$("button2").bind('click', { id: ".box2" }, scroller);

sym.$("button3").bind('click', { id: ".box10" }, scroller);

function scroller(event){

  var scrollYPos = $(event.data.id).offset().top;

  event.preventDefault();

  TweenLite.to(stage, 2, {scrollTo:{y:scrollYPos, x:0}, ease:Power4.easeOut})

}


Viewing all articles
Browse latest Browse all 86170

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>