Jump to content
Search Community

josegtz

Members
  • Posts

    3
  • Joined

  • Last visited

Contact Methods

Profile Information

  • Location
    Mexico City
  1. josegtz

    Timeline Snapping

    Thanks so much for your help. I think this is what I was looking for; it took me a while to discover that logic, but here's the code for anyone with the same case problem. https://codepen.io/jeiemgi/pen/QWYpmGN?editors=0011 Two questions left. I tried to make it so you never see the red background, ay ideas on that, so when the content ends it unpins the container. How to make it snap faster with the function I have? Anyways, I'll keep trying, but I appreciate your time. Thanks!
  2. josegtz

    Timeline Snapping

    @mvaneijgen Thanks so much for your answer, so helpful. Okay, I was using the snap utility wrong. I don't want the snap to happen when I am inside the section content, only if the next or previous element is visible. It should snap to the end of the previous section if the next section is under 50% of the screen (Image-A). OR it should snap to the start of the next section if the next section is past the center of the screen (Image-B). I've seen there's a radius property. But I haven't had luck using it.
  3. josegtz

    Timeline Snapping

    Hello! First of all, Nice and fantastic work on the update of the GSAP website! I am trying to achieve something. I've seen some demos, but my case is slightly different, and maybe I need clarification about how snapping works and possible errors I'm having on the setup or the general idea. I'll try my best to explain myself. 1. I'm trying to pin the container and scroll the inner wrapper by translating it 100%. 2. The last thing I did was to be able to pin to the nearest "start" or the "end" of the section ONLY if it's past the start/end of a section. I attached my code pen example. Sorry if this doesn't go into this forum but I haven't had luck on stack overflow.
×
×
  • Create New...