Jump to content
Search Community

Shakir Wahid

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Shakir Wahid

  1. 3 hours ago, Cassie said:

    Hey there @shakir!

     

    I think you may be looking for wheel/touchmove/pointermove events - not scrolling?

    Take a look at this thread and see if this helps.

     


     

    Thank you @Cassie. This is what exactly I am looking for. I need to implement this with ScrollTrigger pinning. When user scrolls to the container, it should pin on the container and continue the slider like this https://www.gsj.be/en. Once the last slide (animation) completed pin should disable and scroll as regular

  2. gsap.registerPlugin(ScrollTrigger);
    let tl = gsap.timeline();
    let bulletLi = jQuery('.slider li');

    bulletLi.each(function(e){
      tl.to(this, { duration: 3, x: 0, opacity: 1 })
    })
     
     let st = ScrollTrigger.create({
        animation: tl,
        trigger: '.js-bullet-info',
        start: "top top+=10",
        end: "bottom top",
        scrub: 2,
        pin: true,
     })
     
    Hi all. I need a help on animating one element at a time. When I scroll faster it animating all the elements continuously. I need to animate each element on each scroll. How can I do this.
    Thank you.
×
×
  • Create New...