Make the mobile menu submenu open by default

Hello,
I found this answer, how to unfold the submenu (in mobile navigation collapsed) when it opens.
I added the code in theme options > JS, but it does not work.

jQuery(document).ready(function($){
	$('.x-btn-navbar').on('touchend click', function(e) {
		$('.x-sub-toggle').click();
	});
});

Can you give me advice?
regards, Astrid

Hello Astrid,

Thanks for writing in! Your custom code may not work for your site because it is using incorrect class selectors. You need to use the Google Chrome Developer Toolbar to check the live HTML code and find which CSS selector you need to use.

If nothing is helping, kindly provide the URL of your site so we can check it. Be advised that customization is beyond the scope of our support. You will have to troubleshoot and maintain the code by yourself.

Note: If you are unfamiliar with code and resolving potential conflicts, you may select our One or Care service for further assistance. We are unable to provide support for customizations under our Support Policy.

Best Regards.

Ok, i’ll have a look, and come back if necessary.
Best regards, Astrid

Hi Astrid,

Great and let us know how it goes.

Thank you.

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