Disable body scrolling | Class Adder for Webflow Interactions

Поделиться
HTML-код
  • Опубликовано: 25 июн 2020
  • Learn how to disable ‘body’ scrolling when a modal is open on your Webflow website. Useful for modals that need scrolling, like a long sign-up form.
    TIMESTAMPS:
    00:09 - Use case #2
    00:25 - The problem (without the Class Adder)
    01:18 - The solution - live example
    01:49 - Start of the tutorial
    03:05 - The build
    03:44 - Finsweet Class Adder
    05:55 - Watch the Class Adder working live using Webflow Preview
    06:09 - Thank you
    CLASS ADDER FOR WEBFLOW INTERACTIONS: Trigger the add and remove of classes on click, hover, scroll in/out of view, or page-load with ‪@Finsweet‬'s Class Adder Interactions Tool for ‪@Webflow‬.
    See all videos from the playlist: • Finsweet Class Adder f...
    -----------------------------------------------
    // RESOURCES FROM THE VIDEO
    Class Adder: class-adder.finsweet.com/#use...
    Class Adder Webflow cloneable: finsweet.com/classadder-clonable
    Class Adder Interactions Tool: class-adder-script-writer.fin...
    Get FREE help with implementation: sweetjs.finsweet.com/
    Subscribe to Finsweet: ruclips.net/user/Finsweet?su...
    -----------------------------------------------
    // ABOUT US
    We’re Finsweet - a Webflow enterprise partner, badass product creator, and educational content powerhouse. We are taking Webflow to a new level and sharing everything with you along the way!
    🙌 Join our community - finsweet.com/fin-pro
    🛍 Shop our merch store - finsweet.com/merch
    💪 Superpowers for your Webflow website - finsweet.com/attributes
    🧰 Your toolkit for Webflow - finsweet.com/extension
    -----------------------------------------------
    // SOCIAL
    Facebook: / ​
    Twitter: / thatsfinsweet​
    Instagram: / ​
    Dribbble: dribbble.com/thatsfinsweet​
    Behance: www.behance.net/thatsfinsweet/​
    Webflow: webflow.com/team/Finsweet/​
    -----------------------------------------------
    // TAGS
    #ClassAdder #Webflow #Interactions
    -----------------------------------------------
    Thanks for your support! 🤟

Комментарии • 59

  • @DemianVenzke
    @DemianVenzke 13 дней назад

    yeas, it worked fine! I added another trigger-class for the background (clicking the background behind the modal will close it too). Finsweet wrote the script very well. Thank you!

  • @leswins555
    @leswins555 2 года назад +7

    Mine didn't seem to be working at first until I did one crucial step... I had to create the "no-scroll" class on the body element and set the overflow to hidden. Then I removed the class from the body element (since it has been created), and the code worked just fine. Thank you!

  • @Colossus177
    @Colossus177 Год назад +1

    Uhhhhh. Holy Crap! You're a freaking genius! Just changed my life, thanks for sharing!

  • @fancy3958
    @fancy3958 3 года назад +1

    Epic, you deserve much more subscribers with no doubt! Super high quality, thx for the awesome job.

    • @Finsweet
      @Finsweet  3 года назад

      We're super thrilled hearing that!!! Thank you!!!

  • @samsqu4red
    @samsqu4red 2 года назад +2

    Dude that was so lit and such a breeze to implement.. great job!

    • @Finsweet
      @Finsweet  2 года назад

      Glad you enjoyed it!!

  • @cwbydventura
    @cwbydventura 2 года назад

    This worked like a charm!

  • @jarol024
    @jarol024 Год назад

    Worked amazing for me, this was what I was looking for. Thank you, dude!

  • @wolfgangderigo1652
    @wolfgangderigo1652 3 года назад +1

    Hello Finsweet,
    I watch a lot of RUclips videos and also your live broadcasts and I really have to tell you: YOU ARE FANTASTIC!
    I love your content, please keep doing it - Webflow is still a bit special at the moment and not as many use it as they should. If people like you keep generating good content, I'm sure Webflow will have a great future.
    Many thanks for everything
    Greetings from Austria
    Wolfgang

    • @Finsweet
      @Finsweet  3 года назад +1

      Thanks for the kind words. No plans to stop anytime soon.

  • @leonidmaksymyk5429
    @leonidmaksymyk5429 23 дня назад

    thanks a lot for your tutorial!

  • @leandrofuenzalida2777
    @leandrofuenzalida2777 2 года назад

    thanks, so simple to implement.

  • @ayushmukati9827
    @ayushmukati9827 2 года назад +1

    Worked out perfectly! Thank you✌️

    • @Finsweet
      @Finsweet  2 года назад

      You're welcome!!

  • @CaioGonzalez
    @CaioGonzalez 3 года назад +1

    man this is awesome! thank you so much!

    • @Finsweet
      @Finsweet  3 года назад

      You're welcome!!!

  • @filipdolansky4543
    @filipdolansky4543 3 года назад

    Great stuff. Love that!

  • @java7629
    @java7629 3 года назад +1

    wow, thank you so much!!!

    • @Finsweet
      @Finsweet  3 года назад

      You're welcome!!!

  • @MohsinAli-dx2cr
    @MohsinAli-dx2cr 3 года назад +1

    Wow man. You are amazing. Thank you

    • @Finsweet
      @Finsweet  3 года назад +1

      You're welcome!!!

  • @mucmuc3849
    @mucmuc3849 3 года назад +1

    this is great, thanks for it

    • @Finsweet
      @Finsweet  3 года назад

      You're welcome!!!

  • @alejandromilano4301
    @alejandromilano4301 3 года назад +1

    thank you so much!!

    • @Finsweet
      @Finsweet  2 года назад

      You're welcome!!

  • @mahekdave1968
    @mahekdave1968 3 года назад

    Thank you bro.....

    • @Finsweet
      @Finsweet  3 года назад

      You're welcome!!!

  • @madkeys_
    @madkeys_ 2 года назад

    Thank you so much for this. Quick question: I have the ".no-scroll" and ".open-modal" classes added, but where do you actually add the ".close-modal" class?

  • @stephaniekuypers7319
    @stephaniekuypers7319 Год назад

    Thank you so much for the tutorial!
    I'm trying to make this work in a native Webflow mobile nav and can't figure out how to remove the no-scroll from the body when clicking a menu item as well. Do you write this as a separate scrip or does it form part of the same script?

  • @jeremydennis6908
    @jeremydennis6908 Год назад +1

    This no longer works. Can anyone else confirm this?

  • @oscardariorendonzuluaga1318
    @oscardariorendonzuluaga1318 3 года назад +1

    Nice, I would like have that JS code for my project. Thank you.

    • @Finsweet
      @Finsweet  3 года назад

      You're welcome! You can generate the code visually - class-adder-script-writer.finsweet.com/

  • @mr-be3sw
    @mr-be3sw 3 года назад +1

    Nice video! Thanks :). Do you have a video where you explain how you build this? The scroll in the content part. I'm trying to make this. But I have no clue how to!

    • @Finsweet
      @Finsweet  3 года назад +1

      You're welcome!!! You can clone the site and reverse engineer - webflow.com/website/Class-Adder-Interactions-Tool-How-To

    • @mr-be3sw
      @mr-be3sw 3 года назад +1

      @@Finsweet Thank you! I already done that! :) Works great!

  • @VineetKVlogs
    @VineetKVlogs 3 года назад

    what tool is it ?

  • @tuRistst
    @tuRistst 2 года назад

    Will it disable scrolling for ios and touch devices?

  • @JustJayInHD
    @JustJayInHD 2 года назад

    This isn't working on Safari iOS 15, it just scrolls past at certain points and not others, any fix for that?

  • @deepugopi9353
    @deepugopi9353 3 года назад

    My website is automatically scrolling up to the top on mobile view. How can I disable that.

  • @funnellab
    @funnellab 3 года назад

    Hey, it seems that putting the body of the page in "hidden" doesn't scroll on my side.
    However I did check if the "no-scroll" class was added when I hover over the relevant div and it is added. Do you have a solution to this problem?

    • @Finsweet
      @Finsweet  3 года назад

      Hey! Message us on sweetjs.io for help with implementation!

    • @Vlad-vd2on
      @Vlad-vd2on 3 года назад +3

      HI, set .no-scroll: {height:100vh;}

    • @cobistancik
      @cobistancik Год назад

      @@Vlad-vd2on this saved me thank you so much!!!

    • @arealhumanbeing_
      @arealhumanbeing_ Год назад

      @@Vlad-vd2on you saved me too! didn't work until I did this!

  • @filipdahlgren6386
    @filipdahlgren6386 3 года назад +1

    Hi I cant get inte to work.. I have all my sections in one div so I can use fullpage snapping. Does this interfere with the (no body scroll ) script, or do you know what it can be ? 😊 thnx

    • @yacobu3000
      @yacobu3000 2 года назад

      I have the exact same issue. Did you solve it?

  • @evgenijlang8448
    @evgenijlang8448 4 года назад +1

    Where does the class no-scroll come from? its not working on my website

    • @Finsweet
      @Finsweet  4 года назад

      Hey! Thanks for using our product. Please send us a message on www.sweetjs.io/ and we might be able to help you! 🙂

  • @JesseShauffer
    @JesseShauffer 4 года назад +1

    Can this work with the webflow IX2 as well on the same trigger?

    • @Finsweet
      @Finsweet  4 года назад

      Hey Jesse, yes it should without any issue

    • @olehansen6568
      @olehansen6568 3 года назад

      This is great. I have a button that works as both the open and close trigger. Found another script on the webflow forum but after the second click it removes the modal alright but stalls/prevent scrolling the page. I really hope this class adder will do the trick.

  • @anthonybenez1045
    @anthonybenez1045 3 года назад +1

    looks like not working in IOS safari :(

    • @Finsweet
      @Finsweet  3 года назад

      Send us a message on sweetjs.io, and we'll try to help you with this!

  • @arshadhussain39
    @arshadhussain39 3 года назад

    Header shifts to the left when modal is opened

    • @Finsweet
      @Finsweet  3 года назад

      Send us a message on www.sweetjs.io/ and we'll help you fix this!

  • @bjornszz
    @bjornszz 3 года назад

    Doesn't work for me. I've literally spent months trying to solve this problem but I just can't get any solution to work... gah!

    • @Finsweet
      @Finsweet  3 года назад

      Send us a message on sweetjs.io and one of our devs will help you out!