Jump to content
Search Community

mjtpage

Members
  • Posts

    2
  • Joined

  • Last visited

mjtpage's Achievements

1

Reputation

  1. great idea with the code to detect a #jumpLink and then run the ScrollToPlugin. Looks like that's going to work! Thanks for your help Carl
  2. First of all: I LOVE GSAP! And my clients love it. You've created an amazing product here, THANK YOU! I'm struggling with one issue. I'm using ScrollMagic to trigger animations on various parts of the page. One of these is changing the <body> background color -- so the page starts off with a white background, half way down it switches to dark grey, then a little later back to white. It's a cool effect! I'm changing the color from light to dark like this new ScrollMagic.Scene({triggerElement: "#home-5"}) .setTween(TweenMax.to(["body"], 1, {backgroundColor: "#222"})) .addTo(controller1); Then a little further down, I'm changing it back from dark to light like this: new ScrollMagic.Scene({triggerElement: "#home-10"}) .setTween(TweenMax.to(["body"], 1, {backgroundColor: "#fff"})) .addTo(controller1); It's working perfectly when I load the page normally. I can scroll up and down, it changes exactly where it should. But... when I'm on another page and click on a link to jump to a specific section low down on the home page (like example.com#home-11, that is below the initial #home-5 section that changes it from light to dark), it does not work when I scroll back up the page. I hope this makes sense! Any ideas what I need to do to make both events work, even when I'm landing on the page lower down than the ScrollMagic trigger elements? Thanks for your help!
×
×
  • Create New...