Close mobile primary menu item after opening / make primary menu item text only

3 replies · opened Nov 29, 2016

LlivemusicprosNov 29, 2016

On mobile, if you tap on a primary menu item, it opens its submenu. Great. If you click on the same primary menu item again, however, it doesn't close the submenu; it treats the text as a link and navigates there. How can I modify the JS to animate each menu item open/closed when you tap on it instead of linking you somewhere?

Related to this, how do I make a primary menu item text only? They seem to have to be links to be styled correctly and function properly, but what if I don't have a page for the primary menu item because I only want pages for its submenu items?

SSemicolon WebSTAFFDec 4, 2016

Hello,

Unfortunately, currently custom codes cannot be used on the Menu to Open/Close Submenus on Click. You can consider using the following code for the Main Menu Links to stop the clicking behavior on them and just use them to open the Sub Menus:

[Home](#)

Or you can also use a different menu functionality which we implement only on Windows Devices to Open/Close the Sub Menus. To implement this, simply find the following code in the js/functions.js File inside the menufunctions: function() Function Block:

if( SEMICOLON.isMobile.Windows() )

and replace it with:

if( SEMICOLON.isMobile.any() )

Hope this Helps!

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard