How to Easily Add Smooth Scrolling to Your Website - JavaScript Tutorial

Sdílet
Vložit
  • čas přidán 11. 07. 2024
  • It's easy to add smooth scrolling to your existing website using JavaScript. This can be done by using a range of methods - covered in this video include scrolling an element into view, a specific position on the page or relative to the current position.
    For your reference, check this out:
    developer.mozilla.org/en-US/d...
    🏫 My Udemy Courses - www.udemy.com/user/domenic-co...
    🎨 Download my VS Code theme - marketplace.visualstudio.com/...
    💜 Join my Discord Server - / discord
    🐦 Find me on Twitter - / dcodeyt
    💸 Support me on Patreon - / dcode
    📰 Follow me on DEV Community - dev.to/dcodeyt
    📹 Join this channel to get access to perks - / @dcode-software
    If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
    #dcode #javascript

Komentáře • 7

  • @Tony.Nguyen137
    @Tony.Nguyen137 Před 6 měsíci

    I learn so many new tricks from you pls dont ever stop ❤❤ I watch all the ads so you don’t have ever to work again

  • @TomasMisura
    @TomasMisura Před 6 měsíci

    this small piece of code is very useful...thank you very much for this

  • @andrethomas3262
    @andrethomas3262 Před 4 měsíci

    Mine doesn't smoothly scroll. Do I have to do that hack in the Chrome flags? This seems to be a widespread issue so I'm curious how you're doing it.

  • @almazmusic
    @almazmusic Před 6 měsíci

    No! This is a BAD video/advice/whatever. You don't want to steal a SYSTEM scroll. If you want a macOS scroll feel - buy a Mac, but don't steal the native and give the user this shitty parody.

    • @cloudpuncher4615
      @cloudpuncher4615 Před 6 měsíci

      You clearly have no idea how these API's are used. Think scroll based animations using interserctionObserver() or even a scroll to sign up/ form/ contact ect... You're not hijacking the users ability to scroll....

    • @dcode-software
      @dcode-software  Před 6 měsíci +1

      Appreciate the feedback - just to clear up these methods are called programmatically like for example in a response to an event on the webpage.

    • @douglascounts4634
      @douglascounts4634 Před 6 měsíci +1

      "macOS scroll feel"