Jump to content
Search Community

How to change the background image when scroll

Narendra Verma test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello hybreeder,

 

I hope that you are just using those images for an example/learning purpose. It's illegal to copy assets from other's websites. 

 

With that being said, the biggest issue is that you are trying to use ScrollMagic but didn't include it in the pen. You should include the following assets:

ScrollMagic isn't a GreenSock product and we don't officially support it in these forums. Maybe this post by our very own Craig can help you:


If you have any GSAP-specific questions, we'd love to help. Good luck with your project!

Link to comment
Share on other sites

@mikel, Sorry for miss communication.

 

I updated the code here. What I am doing Is, on page load I have to display image from css(OR image tag) and once indicator start 1 cross the target then display the image form GSAP script and it will override the image which coming from the CSS and vise and versa

This is my example link section  "How it works"  https://www.sketchdeck.com/

 

New code pen code here

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...