Jump to content
Search Community

lmschreiber

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by lmschreiber

  1. Hi, I am trying to replace Scrollmagic with ScrollTrigger, but the animation is not triggered. The Scrollmagic Code is: let cTimeLineMax = gsap.timeline().set(divHeroBg, {y: 0, opacity: 1}).to(divHeroBg, 1, { y: -50, opacity: .8, ease: Quad.easeInOut }); new ScrollMagic.Scene({ triggerElement: divHeroContentWrap2, duration: divHeroContentWrap1.height(), triggerHook: 1 }).setTween(cTimeLineMax).addTo(ScrollMagicController); I tried to replace it with the following ScrollTrigger code: gsap.timeline({ ScrollTrigger: { trigger: divHeroContentWrap2, start: "center center", end: this.iScreenHeight + "px", pinSpacing: false } }).set(divHeroBg, {y: 0, opacity: 1}).to(divHeroBg, 1, { y: -50, opacity: .8, ease: Quad.easeInOut }); Does anybody see the mistake?
  2. Hello everybody, I am trying to resize an element with scale. The div stays centered, but I want it at the top and the screen section should scroll in. Does anybody know, why the DOM element is not resized? Thanks for your help.
×
×
  • Create New...