Jump to content

Search In
  • More options...
Find results that contain...
Find results in...
Kym Lee

Help with trying to stagger images on my site I am doing

Recommended Posts

I am learning for the first time using gsap. I am also a beginner and still learning web development.

I am having trouble trying to get my cocktail images to stagger and move into view when scrolling, I am not sure how to do this?

Could someone help please? I have an assignment I need to hand in 


I have attached a only a note pad txt file as it wont allow me to upload my site due to the size.



Link to comment
Share on other sites

When I get stuck I open a Codepen.io/pen and see what I can manage to get working. I usually fork my work several times to test out different ideas, this is the best way of learning I've found. And  when nothing else works I could share the codepen URL with others to ask for help.



I've dumpt your code in a pen and the first notice I get is that you've divined `yMove` twice 


const yMove = document.querySelector(".cocktail")
var yMove = 50;

See the Pen zYoRNoG?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen


I've got something working, but have no idea what it should look like: codepen.io/mvaneijgen/pen/mdOXRwp

  • Like 4
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.