Jump to content
Search Community

prav420

Members
  • Posts

    6
  • Joined

  • Last visited

prav420's Achievements

  1. @GreenSock the portion of code I tried for javascript is pasted above , I made same kind of html structure for tablet also, but doesn't work in tablet. and I'm using it in react application.
  2. const sections = gsap.utils.toArray('section') ScrollTrigger.create({ trigger: '.first', start: 'top top', endTrigger: '.last', end: 'bottom bottom', //snap: 1 / (sections.length - 1) snap: { snapTo: 1 / (sections.length - 1), duration: {min: 0.25, max: 0.75}, // the snap animation should be at least 0.25 seconds, but no more than 0.75 seconds (determined by velocity) delay: 0.125, // wait 0.125 seconds from the last scroll event before doing the snapping ease: "power1.inOut" // the ease of the snap animation ("power3" by default) this code specifically I tried it in my tablet version of code using react, but the same worked fine for desktop.
  3. @GreenSock @Cassie https://codepen.io/akapowl/pen/RwVwrpv/5bbc8a970b867ded2a331a6ecf088821 - I tried the same logic for tablet but it's not working properly not sure why. can you please guide me on this ? This worked for desktop though.
  4. Thanks for the reply, I figured it out and removed .fromTo() in my code and used .set() for initial state set and .to() to animate
×
×
  • Create New...