Making links clickable in mobile nav

I have a menu and some of the top links have sub links. On desktop, the user can click the top links and navigate to the page, but on mobile, since the user must click the top link to reveal the sub links, the top links aren’t clickable, and the user is unable to navigate to the page the top links point to.

What’s the fix for that?

Summary

belcarahealth.com

Hi there,

Thanks for writing around! To make the top links clickable, please add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript

jQuery(document).ready(function($){
	$('.x-off-canvas .x-anchor-menu-item .x-anchor-text').on('touchend click', function(e) {
		var link = $(this).parents('.x-anchor-menu-item').attr('href');
		window.location.href = link;
	});
});

Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!

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