Jump to content
Search Community

plankton

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by plankton

  1. The actual parallax is smooth and works perfectly for me, it just doesn't work with two items selected within the 'data-module-parallax'.

     

    For example, in the first test block #01 both c-blockShow_content and c-blockShow_img have the attributes applied but only the content block has parallax.

     

    I removed my second arrayTo in the codepen example above.

     

    Hope that makes sense.

     

    Here's the second codepen with the arrayTo within the first one: if you inspect, you can see the transform applied to both c-blockShow_content and c-blockShow_img.

     

    See the Pen BapRqYR?editors=0110 by plankton (@plankton) on CodePen

     

     

  2. Hi all, I'm trying to create a mini parallax gsap plugin using ScrollTrigger where you can set "data-parallax data-speed'' attributes to any item within the ScrollTrigger target  'data-module-parallax'.

     

    I've tried creating an arrayTo loop within the first one which kind of works but creates a bit of a janky result.

     

    Is there a way to achieve this? Any help would be most appreciated.

     

    Test Block #01 has two "data-parallax data-speed='-0.2'" applied.

    See the Pen XWpRBem?editors=1010 by plankton (@plankton) on CodePen

  3. Had the same issue, but here's the solution

     

    setTimeout(function () {

    var scroll = new locomotiveScroll({

    el: document.querySelector(".o-scroll"),

    smooth: true,

    getSpeed: true,

    getDirection: true

    });

    scroll.on("scroll", function (t) {

    document.documentElement.setAttribute("data-direction", t.direction);

    });

    }, 100);

     
    • Thanks 1
×
×
  • Create New...