Jump to content
Search Community

syavik2001

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by syavik2001

  1. I already figured it out! Previously, pixels could not be specified, but now they are required! I don't understand why you didn't notice this in my first message. I figured it out myself by trial and error. start: '-1150', end: '-200', dont work now with 3.12.6 start: '-1150px', end: '-200px', is working THX
  2. link https://codepen.io/Papandos-2001/pen/rNbbQvW
  3. After updating to version 3.12.5, my code stopped working. It worked fine with the old version of ScrollTrigger.min.js. document.addEventListener("DOMContentLoaded", (event) => { gsap.registerPlugin(ScrollTrigger) // gsap code here! ScrollTrigger.defaults({ smoothScrolling: false }); let itemsL = gsap.utils.toArray('.gallery__left .gallery__item') itemsL.forEach(item => { gsap.fromTo(item, { opacity: 0, x: -250 }, { opacity: 1, x: -10, scrollTrigger: { trigger: item, start: '-1150', end: '-200', scrub: true, } }) }) let itemsR = gsap.utils.toArray('.gallery__right .gallery__item') itemsR.forEach(item => { gsap.fromTo(item, { opacity: 0, x: 250 }, { opacity: 1, x: 10, scrollTrigger: { trigger: item, start: '-1050', end: '-200', scrub: true, } }) }) });
×
×
  • Create New...