Superfish menu and mobile devices

1 reply · opened Nov 4, 2017

Xx-137Nov 4, 2017

Hi,

Superfish menu not correctly works on mobile devices!

First touch doesn't open the associated submenu, and at once follows the link.

It is well visible on your demonstration website - Features->Widgets , Shop, Home, etc...

How to correct it?

Thanks!

SSemicolon WebSTAFFNov 4, 2017

Hello,

Consider adding the following JS Code at the bottom of the Page just after the js/functions.js JS File Linking:


	jQuery(document).on( 'ready', function(){
		if( SEMICOLON.isMobile.any() ) {
			if( jQuery().superfish ){
				jQuery('#primary-menu > ul, #primary-menu > div > ul,.top-links > ul').superfish('destroy').addClass('windows-mobile-menu');
			} else {
				jQuery('#primary-menu > ul, #primary-menu > div > ul,.top-links > ul').addClass('windows-mobile-menu');
				console.log('menufunctions: Superfish not defined.');
			}

			jQuery( '#primary-menu ul li:has(ul)' ).append('[](#)');

			jQuery( '#primary-menu ul li.sub-menu' ).children('a.wn-submenu-trigger').click( function(e){
				jQuery(this).parent().toggleClass('open');
				jQuery(this).parent().find('> ul, > .mega-menu-content').stop(true,true).toggle();
				return false;
			});
		}
	});

This will enable a functionality which will enable the Dropdown Arrow to Open/Close the Sub Menus.

Hope this Helps!

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

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