[Resolved] Scroll to anchor not working with mobile menu

Tagged: 

  • Author
    Posts
  • #8919

    ChrisJ
    Participant

    Site is http://www.kevingeorgebuildingservices.co.uk/mulbarton/
    I have active child theme with Polestar as template which is working fine.
    I’ve added a script to alow links in the menu to scroll to anchor. I also had to add jquery/1.12.4/jquery.min.js to get the script to work. This now works fine when main menu is showing but doesn’t work with the mobile menu. Any thouhts please.

    #8920

    Andrew Misplon
    Keymaster

    Hi Chris

    Great to hear from you. Did you try set this up without an external script? This functionality is already built into Polestar. You also shouldn’t need to add jQuery, the main JS file in Polestar is dependent on jQuery, it’s already being added from the WordPress core.

    Can you perhaps remove the script and remove jQuery and let me know once that’s done and I’ll take a look at the issue?

    #8921

    ChrisJ
    Participant

    Hi Andrew

    Thanks for getting back to me.

    I have deactivated the script and jQuery that I added.

    Can only see that scroll back to top is included. My anchors on home page are currently set as div id’s to work with the script I had. The links in the menu are set as about us and in that dropdown. Should I be using some other anchors and links to achieve scroll to anchor.

    Thanks again for your help.

    Chris

    #8922

    ChrisJ
    Participant

    Hi again Andrew

    Have now discovered that since removing script Polestar is in fact mostly scrolling to the anchors which is great. Using the mobile menu the links and scroll seem to work fine for all links. When using the main menu at top of page the about us link scrolls but the other links in the dropdown below about us flick to the anchor without scroll.

    Chris

    #8923

    Andrew Misplon
    Keymaster

    Sorry for delay. Back at laptop shortly and can reply fully then. This post is for Ultra but functionality wise it’s all the same as Polestar so it can be referenced:

    Build a One Page Website

    #8924

    ChrisJ
    Participant

    Hi Andrew

    Have investigated the link and info re Ultra.

    Tried adding class puro-scroll to my anchor points without effect. Links in the dropdown menu still flick straight to anchor. Links in main menu primary items working fine and all links in mobile menu working correctly.

    ChrisJ

    #8925

    Andrew Misplon
    Keymaster

    Thanks. Sorry for lack of reply. Adding the class isn’t necessary in the case of row ID’s. I did do the same test to confirm.

    There is a JS error that looks to be causing this.
    Will resolve ASAP and update you as soon as I’ve done so.

    #8926

    Andrew Misplon
    Keymaster

    I’ve located the issue. I’ll release an update in the next couple of days to fix. Apologies for the delay.

    Thanks for the feedback 🙂

    #8929

    ChrisJ
    Participant

    Hi Andrew

    Had nitification that there was a theme update so updated. Now scrolling has stopped working for mobile menu and is still not working for dropdown but is working on main menu primary item.

    Just lettin you know for feedback.

    ChrisJ

    #8930

    Andrew Misplon
    Keymaster

    Hey Chris that release is from last week and only removes one function from inc/siteorigin-panels.php so it shouldn’t have impacted smooth scroll. Will take a look and get the update out today hopefully.

    #8931

    ChrisJ
    Participant

    I assumed that that was probably the case but just thouht I’d let you know the latest after that update.

    Thanks for the continued support, will watch out for new update.

    ChrisJ

    #8940

    Andrew Misplon
    Keymaster

    Here is a pre-release version to test: https://www.dropbox.com/s/dvcsxktwwwh8hzt/polestar.1.2.1.1.zip?dl=0.

    Download the ZIP to your desktop.
    Switch to any other theme.
    Delete Polestar.
    Install from Appearance > Themes > Add New > Upload Theme.

    Hope that helps.

    #8945

    ChrisJ
    Participant

    HI Andrew

    You’re a star!
    That works a treat.

    Thank you for your help, great support.

    ChrisJ

    #8946

    Andrew Misplon
    Keymaster

    Super, glad to hear it’s working as expected now. Thanks for testing.

    All the best.

    #9986

    frontendgsus
    Participant

    Hello, I don’t know if this is the case but, I’ve been working on some client’s WordPress with polestar theme and the problem with the mobile menu was that the JS from Js/jquery.theme.js is not running, when you click the #mobile-menu-button there is no event. I’ve tried to run the same code on another external Js file and the mobile menu dropdown worked!

    hope it helps anyone

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic.

Scroll to top