Resolved

Scroll to anchor not working with mobile menu

Polestar Theme started by ChrisJ Mar 5, 2018 15 replies
ChrisJ Mar 5, 2018 · 9:28 am #8919

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.

Andrew Misplon Puro Mar 5, 2018 · 9:47 am #8920

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?

ChrisJ Mar 5, 2018 · 1:08 pm #8921

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

ChrisJ Mar 5, 2018 · 3:20 pm #8922

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

Andrew Misplon Puro Mar 5, 2018 · 3:26 pm #8923

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

ChrisJ Mar 5, 2018 · 7:25 pm #8924

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

Andrew Misplon Puro Mar 5, 2018 · 7:30 pm #8925

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.

Andrew Misplon Puro Mar 5, 2018 · 9:22 pm #8926

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 🙂

ChrisJ Mar 6, 2018 · 11:30 am #8929

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

Andrew Misplon Puro Mar 6, 2018 · 11:48 am #8930

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.

ChrisJ Mar 6, 2018 · 2:05 pm #8931

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

ChrisJ Mar 7, 2018 · 10:31 am #8945

HI Andrew

You’re a star!
That works a treat.

Thank you for your help, great support.

ChrisJ

Andrew Misplon Puro Mar 7, 2018 · 10:35 am #8946

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

All the best.

frontendgsus Jun 12, 2018 · 2:19 pm #9986

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

Andrew Misplon Puro Jun 12, 2018 · 2:40 pm #9987

Hi frontendgsus

I’d be keen to work this problem with you. Do you think you can open a new topic for us? This one is resolved.
The form is at the bottom of this page: https://purothemes.com/support/forum/polestar-theme/. I’m sure we can find a resolution.

16 posts