Jump to content
Search Community

Problem with Horizontal scroll magic with accordion

Nargess Shabani 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

I have some problems with scroll magic goes horizontal example. I have part of my portfolio website which I have some accordion images and I want them to expand to their 100% width as the people scroll the page. not by hovering. 
like what norgram.co is doing more or less but I just want it on my images.

so I started to use the go horizontal structure of the magic Scroll and nothing is working and I don't know why.


help me, please. I am stuck.

See the Pen oRvjGr#code-area by nargess-shabani (@nargess-shabani) on CodePen

Link to comment
Share on other sites

ScrollMagic isn't a GreenSock product so we can't really help too much as this forum is dedicated to GSAP problems and questions.

 

That being said, you'll need one more file to allow ScrollMagic to hijack the tweens.

 

<script src="https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.6/plugins/animation.gsap.js"></script> 

 

I'm not sure what should be happening because you've commented out your controller and never added the scene to it.

 

Have you taken a look at the ScrollMagic docs for horizontal scrolling?

https://scrollmagic.io/examples/basic/going_horizontal.html

 

If you have GSAP related questions or problems, we're happy to help.

 

Happy tweening.

 

 

  • Like 3
Link to comment
Share on other sites

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...