[Support request] Smooth-scroll not working on Main Page

Home Forums Support [Support request] Smooth-scroll not working on Main Page

Home Forums Support Smooth-scroll not working on Main Page

  • This topic has 5 replies, 2 voices, and was last updated 4 years ago by David.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1222283
    James

    I’m using the smooth-scroll class in two menu items. When on the home page, they are supposed to scroll to the target section (GenerateBlocks container). At the moment, they snap to the section and not scroll.

    [url=https://ibb.co/SJkpZY9][img]https://i.ibb.co/SJkpZY9/2020-04-01-16-00-42-Customize-Discover-how-others-turned-their-business-vision-into-reality-Found.jpg[/img][/url] [url=https://ibb.co/7j4vVSv][img]https://i.ibb.co/7j4vVSv/2020-04-01-16-01-12-Customize-Discover-how-others-turned-their-business-vision-into-reality-Found.jpg[/img][/url]

    Also, if I’m only using the #ID format (and not the full URL), is there any way I can add the full link somewhere, so that when not on the home page, users can still be taken to those IDs?

    #1222383
    David
    Staff
    Customer Support

    Hi there,

    in Customizer > General – have you enabled the smooth scroll option? If you have can you link me to your site so i can see the issue.

    The second part, simplest way would be to add a duplicate menu item for each of those links.
    Then your existing menu item for use on the home page add this class: home-show
    And for the menu items with the full URL add this class: home-hide

    Then add this CSS to your site:

    body:not(.home) .home-show,
    body.home .home-hide {
        display: none;
    }
    #1222388
    James

    Hi David, I was using FF dev mode and it didn’t work, but in Chrome smooth-scroll worked as normal. Not sure why FF has a problem, but I’d imagine most are using Chrome. Not sure about Safari.

    As for the 2nd issue, I will try it and get back to you.
    Thanks

    #1222398
    David
    Staff
    Customer Support

    Do you have any extensions in FF? – maybe an ad-blocker or something that is stopping some javascripts from running

    #1222650
    James

    No it’s a clean install afaik…

    Regarding the 2nd point, I had to add an !important property for it to work, but it worked! Thanks

    #1223080
    David
    Staff
    Customer Support

    If you want to provide us a link to the site i can take a look to see if its an isolated issue?
    You can edit your original topic and use the Site URL field to share the link privately.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.