Colon Theme Help Free theme

Mobile menu doesn’t work properly

N Started by Nikolina · May 5, 2021 at 8:14 pm · 3 replies 0 voices Last reply 5 years, 2 months ago
N
Nikolina Original poster Member
#1

Hello, I can’t seem to get my One-Page navigation working on the mobile menu. I can see that the site is scrolling down to the sections, but the user has to click the X to make the menu disappear instead of the menu disappearing automatically once link is clicked. Is there any solution to this? I already tried deactivating plugins and it seems that is not an issue. Thank you for your help.

ST
Spiracle Themes Original poster
#2

Hi Nikolina

Try the following method

1) First of all install & activate plugin Code Snippets
You can directly install the plugin from Plugins -> Add New and search for Code Snippets in the search bar

2) After this, Go to Snippets -> All Snippets and click on Edit link of the Example JavaScript Snippet. Check Screenshot

VIEW SCREENSHOT

3) After this, Add title and code and set the script to run on the front end only, and then save and activate it.

VIEW SCREENSHOT

CODE:

(function ($) {
		  $(document).ready(function () { 

			$( '.hd-bar .side-menu ul li a' ).on("click", function(){
			  $(".hd-bar").removeClass("visible-sidebar");
			});

		  });        

	})(this.jQuery);

4) Refresh your page and check

Best Regards

Post a reply

Join the conversation. Be kind — this is a public forum.

Replying to Mobile menu doesn’t work properly

By posting, your reply becomes public (unless marked private).