david
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by david
-
-
Hi,
I try to scroll from an anchor to a div, it's work to go to the top of window but from top of window to a bottom section it doesn't work.
See the Pen dtJog by dhenriet (@dhenriet) on CodePen
function TweenScroll(anchor) { $(anchor).click(function(e) { e.preventDefault(); var domId = $(anchor).attr('href'); //.attr('href').slice(1); var domScroll = $(domId).offset().top; console.log(domScroll); TweenMax.to(window, 1.5, { scrollTo: { y: domScroll }, ease: Back.easeInOut }); }); } TweenScroll('#top'); TweenScroll('#start');
-
-
Hi Jonathan,
thanks a lot, yes it helps ! It doesn't work because backgroundPosition was defined in percents in CSS, I need to use same unity to tween it.
-
Hi Rodrigo, thanks for your answer. There wasn't tween on background position (set in pixel instead of percent), I updated the jsFiddle link in case of someone has a few time to look it. http://jsfiddle.net/gamedware/wdn8q6oh/
I already create an issue on ScrollMagic Github because I don't know if the problem comes from ScrollMagic or GSAP I am very worried because I have to make a parallax animation (so I choose ScrollMagic + Tween Js) and if I can't tween more than one <div> it's problematic.
I understand you don't support third party plugins but I create a CodePen with only GSAP and I have the same problem, only once has a tween
-
GASP ScrollToPlugin > scroll bottom
in GSAP
Posted
Hi and thanks Rodrigo, you rock ! Its' working nice with `Linear.easeNone`. love GSAP !
I found this post useful with scrollTo plugin demo http://codeaway.info/greensock-animation-platform-scroll-to-plugin-sample/, http://codeaway.info/sample.code/scroll.to/scroll.to.sample.html