- This topic has 15 replies, 3 voices, and was last updated 6 years, 1 month ago by
Tom.
-
AuthorPosts
-
October 11, 2017 at 2:27 pm #401562
Q
Hi there,
I am having an issue with getting the mobile menu to work in desktop view. It works in tablet and phone view.
I have my topmenu ticked for both Primary Menu and Slide Out Menu, in Customize I have set the Slide Out Navigation to both.
Another funny thing is the Primary Menu and Slide out Menus both show in the desktop view, but not in tablet or mobile views.
Can you direct me to the correct method.
Thanks
QOctober 11, 2017 at 8:30 pm #401678Leo
StaffCustomer SupportHi there,
If you only want the slide out toggle on desktop, try creating a a new menu with no menu items in it and set it primary navigation.
Let me know if this helps.
October 11, 2017 at 11:13 pm #401716Tom
Lead DeveloperLead DeveloperThat’s strange, it should be working.
Just to make sure, your setting in Customize > Layout > Slide-out Navigation is set to “Both”, correct?
October 11, 2017 at 11:22 pm #401719Q
Hi Leo,
That did’nt work. On the desktop I just have the hamburger icon but when I click it nothing happens, no slide out.
I have created two menus now. Primary navigation(top mennu) with no menu items in it and Slide out Navigation (mobilemenu) with the menu items in it.
Still works in tablet and mobile views.
Thanks
QOctober 11, 2017 at 11:25 pm #401720Tom
Lead DeveloperLead DeveloperCan you try turning off the mobile header just to test?
October 12, 2017 at 9:09 am #402045Q
Hi Tom,
Yes, my setting in Customize > Layout > Slide-out Navigation is set to “Both”.
I have also now disabled the mobile header in Customize > Layout > Header > Mobile Header is set to Disable.
Still no luck with the Slide-out Navigation.
Thanks
QOctober 12, 2017 at 10:14 am #402093Tom
Lead DeveloperLead DeveloperCan’t reproduce this issue on my end.
Can you try deactivating your other plugins one by one to see if any of them are causing a conflict?
October 12, 2017 at 12:57 pm #402182Q
Hi Tom,
I will give it a go and let you know the results.
Thanks again.
TomOctober 12, 2017 at 2:28 pm #402247Q
Hi Tom,
I have deactivated my other plugins one by one to see if any of them are causing a conflict and deactivated all of them just leaving GP active but still the same result with the mobile menu.
When I hover or click on the hamburger icon I get, my website address/#generate-slideout-menu don’t know what this means or this helps.
Thanks
QOctober 12, 2017 at 10:12 pm #402363Tom
Lead DeveloperLead DeveloperCan you try removing the smooth scroll code you added in GP Hooks?
October 13, 2017 at 7:00 am #402547Q
Hi Tom,
Yes that worked!!!
I followed your instructions and disabled the smooth scroll code in GP Hooks.
Is it best to move the smooth scroll to another GP Hook area or just disabled the whole code.
Thanks again Tom, much appreciated.
Thanks
QOctober 13, 2017 at 9:07 am #402666Tom
Lead DeveloperLead DeveloperCan you show me the code you were using? I should be able to tweak it so it will work with the slideout menu 🙂
October 13, 2017 at 10:18 am #402724Q
Hi Tom,
Here is the script
<script>
jQuery(function() {
jQuery(‘a[href*=”#”]:not([href=”#”])’).click(function() {
if (location.pathname.replace(/^\//,”) == this.pathname.replace(/^\//,”) && location.hostname == this.hostname) {
var target = jQuery(this.hash);
target = target.length ? target : jQuery(‘[name=’ + this.hash.slice(1) +’]’);
if (target.length) {
jQuery(‘html, body’).animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
</script>Thanks
QOctober 13, 2017 at 9:39 pm #402942Tom
Lead DeveloperLead DeveloperGive this a shot instead:
<script> jQuery(function() { jQuery( 'a[href*="#"]:not([href="#"]:not([href="#generate-slideout-menu"))').click(function() { if (location.pathname.replace(/^\//,") == this.pathname.replace(/^\//,") && location.hostname == this.hostname) { var target = jQuery(this.hash); target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']'); if (target.length) { jQuery('html, body').animate({ scrollTop: target.offset().top }, 1000); return false; } } . }); }); </script>
October 14, 2017 at 5:15 am #403029Q
Hi Tom,
That worked!!!!
Thanks again, much appreciated.
-
AuthorPosts
- You must be logged in to reply to this topic.