Jump to content
Search Community

Add ScrollSmoother to webflow

Robinaerts test
Moderator Tag

Recommended Posts

I think this may be what you're looking for? 

https://university.webflow.com/lesson/custom-code-in-the-head-and-body-tags

 

Quote

Why can't I add long code?

Custom code in each section cannot be longer than 10,000 characters. If the code you want to place on your site is longer, you can store it on another server and then embed it as a script file.

 

  • Like 1
Link to comment
Share on other sites

Hi Cassie, 

 

I have imported the gsap library and scrolltriger library so you can see in the picture. I have setup a github account to host the smoothscroller script and used jsdeliver to add the code to my project because in webflow you cannot have more than 10.000 charachters. I added the code to activate the scrolltrigger and smoothscroller and I have set up 2 divs 1 with id "#smooth-wrapper" and the other with "#smooth-content" but it stil not work.

 

This is the project I'm working on:

https://webflow.com/design/reflect-media?pageId=624923d83fb51e8116295f99

 

Some pictures:1504059692_Schermafbeelding2022-04-03om18_13_10.thumb.png.84e7be703a58fddaff986cb6682ca4c2.png

 

 

Link to comment
Share on other sites

11 minutes ago, PointC said:

That's a different ScrollTrigger. Same name but not a GSAP product. You should have this one.

 

https://cdnjs.cloudflare.com/ajax/libs/gsap/3.10.2/ScrollTrigger.min.js

Happy tweening.

Thanks I have changed that one! But unfortunately it is still not working..

Link to comment
Share on other sites

10 minutes ago, GreenSock said:

It looks to me like you're not loading ScrollSmoother. :) Or am I missing it? 

It's there in the screenshot as the 3rd script. It's just been renamed. I followed that link and it is indeed ScrollSmoother 3.10.2.

 

7 minutes ago, Cassie said:

Ah! It says 'before body tag' in your screenshot

I assumed that meant at the bottom of the page since it's the closing tag for the body in the screenshot. Exactly where you'd want them. But maybe I'm wrong.🤷‍♂️

 

I tried looking at the webflow project, but it forces you to set up an account and I'm not gonna do that. 

Link to comment
Share on other sites

14 minutes ago, PointC said:

It's there in the screenshot as the 3rd script. It's just been renamed. I followed that link and it is indeed ScrollSmoother 3.10.2.

Oh, that's not good...

  1. You're sharing a link to the raw source code so it's granting everyone on the web access to an unprotected members-only plugin. I'm gonna delete that screenshot for now. 
  2. That's an ES6 file and the screenshot is chopped so I can't see if you properly set type="module". You should probably be using the file that ends in .min.js (the minified, ES5 file that's compatible with all browsers). 
16 minutes ago, PointC said:

I tried looking at the webflow project, but it forces you to set up an account and I'm not gonna do that. 

Same here. 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...