Jump to content
Search Community

KeviinCosmos

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by KeviinCosmos

  1. On 4/5/2022 at 10:57 PM, walpolea said:

    I ran into the same issue with a tabbed component changing the content height. The only solution I found was to dispatch a resize event which ScrollTrigger refreshes values on pretty gracefully.

    window.dispatchEvent(new Event("resize"));

     

    This also works as images lazily load in, but there is some undesired jank as things recalculate while the scrolling is mid-tween

    document.querySelectorAll("img[loading=lazy]").forEach((i) => {
      i.addEventListener("load", (e) => {
        window.dispatchEvent(new Event("resize"));
      });
    });

    THANK YOU SOOOO MUCH!!!!! ❤️

    • Like 1
  2. I did found out my self.
    scrollTrigger was an old version, even though I picked the newest from cdnjs.. It was version1.x.x..

     

    Where do I find the newest CDN urls?

  3. What do you need?`I can't see more if I share the url. I've inspected the site and you can see my code is shown in the footer before the custom code/call.
    Can I share the url privately, so it won't get spammed?

  4. I've installed GSAP to my WordPress site and from what I can see everything is in the correct order, so I have no idea why the ScrollTrigger plugin won't work.

    I'm trying to use the example from codepen on my page.

     

    Here's my setup

    1. Error code in dev tools:
    https://go.seee.link/JEJvQvU8Ag.png

     

    2. Scripts in Scripts Organizer:
    https://go.seee.link/msedge_jCDsAgNXP4.png

     

    3. My code in Scripts Organizer: 
    https://go.seee.link/msedge_p1O511O7G1.png

     

    4. Order of output in browser:
    https://go.seee.link/chrome_K0KPbBJSiy.png
     

    Thanks in advance

    See the Pen GRWobyX?editors=1010 by GreenSock (@GreenSock) on CodePen

×
×
  • Create New...