Support » Plugin: Hash Link Scroll Offset » how does this plugin make scroll smooth ?

  • Resolved Daniel

    (@davil2008)


    Hello.
    I installed this plugin for one reason. I have a header social icons widget area in my theme so I added this code to create this anchor link :

    <div id=”top”></div>

    I then added a custom menu item to my footer menu with the same #top url. I then had this scroll to top button but it didn’t scroll smoothly even if I added the code. So I installed this plugin that made the button scroll smoothly. I haven’t changed any of the settings. So I feel like this is can’d of a useful plugin for me, so I would like to ask how the plugin made the scrolling smooth, so I can do it manually.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter Daniel

    (@davil2008)

    OK, but if I move the id=top to header.php, how can I refer the smooth scrolling code to work on the id=top, I can’t just add this to a widget:

    <style>html {
      scroll-behavior: smooth;
    }</style>
    Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    I don’t believe those would make any difference.

    What I recommended was move the target anchor to earlier in the DOM so that it goes up as high in the page as it possibly can. Meanwhile that style would be already applied and just has influence on how it looks getting there.

    Thread Starter Daniel

    (@davil2008)

    I’m a complete beginner in this and have no idea what you just said.

    Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    You seem to be doing way better than you could be for a complete beginner, so don’t sell yourself that short.

    Worst case scenario, tinker and try things out. Remember that the placement of <div id="top"></div> just tells the browser where to scroll to, and the scroll-behavior: smooth; css tells the browser how to behave while scrolling.

    Thread Starter Daniel

    (@davil2008)

    Well, OK… Thank you for your time and support !1

    Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome.

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘how does this plugin make scroll smooth ?’ is closed to new replies.