Problems with menu and smooth scroll

Hello, I’m using
PRO theme version 3.1.2
with PRO Child theme 3.1.2
WP Version 5.3.2

I was having an issue with the page not smooth scrolling to a section ID (It would just jump to the section) I then added a code that I got from the support forum topic https://theme.co/apex/forum/t/smoothing-out-the-jump-to-section-function/943/7

jQuery(function($){
$(‘a[href*="#"]’).off(‘touchend click’);
$(‘a[href*="#"]’).on(‘touchend click’, function(e) {
e.preventDefault();
var id = $(this).attr(‘href’);
var $id = $(id);
if ($id.length === 0) {
return;
}

var pos = $id.offset().top - 70;
$('body, html').animate({scrollTop: pos}, 1000, 'easeInOutQuart');
return false;

});
});

When I add the code to the js section of the theme the smooth scroll works great, however my mobile menu does not show up.

Can you give me some way to have smooth scroll and my mobile menu to work as well?

I have tried disabling all plugins, I have revoked validation and then re-validated. Everything is current software that I can tell.

The URL is https://wallanchorsonline.com/2019

I’m currently going to leave the js file so the smooth scroll will work.

The smooth scroll trigger is the “Contact Us” button in the navigation area. It should just smooth scroll down to the contact section on everypage. Can you please have a look and let me know what could be wrong?

Hey Scott,

The smooth scroll issue is a known bug in the Original Header but the mobile menu is really not supported by the Original Header. Your case is the same as in this thread.

Since you’re using Pro, please create a Pro Header. Not only will the smooth scroll work without adding custom code, but Pro Header also supports smooth scrolling and sticky header offset from mobile to desktop views.

We do not provide code to make the Original Header replicate the behavior of the Pro header so you will need to hire a developer to achieve that if you wish to continue with the Original Header.

If you create a Pro Header instead, please remove the custom JS you copied from another thread. If you’re new to creating Pro Headers, please watch the tutorials available in our Knowledge Base and our Youtube Channel

Hope that helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.