Submenu not working on mobile devices

Hi,

I’m using Integrity and my mega menu doesn’t work anymore on mobile devices.
I have tried adding the following in Theme Options > JS

jQuery(function($) {
$(’.x-sub-toggle’).on(‘click touchstart’, function(e) {
e.preventDefault();
$(this).toggleClass(‘x-active’).closest(‘li’).toggleClass(‘x-active’);
});
});

But this code didn’t work for me?
Actually it made it worse and made all drop down menus stop working.
Do you have anything different to try?

Thanks, Scott

Hello There,

Thanks for writing in!

The submenu does not open because the menu structure is broken. You have forgotten to insert a url for your menu item.

I went ahead and edited your menu items. I added # as the url. This will link to none and the correct way of having link that goes to nowhere.

Please clear your phones browser cache or use private browsing mode and test your site.

Hi RueNel,

Thank you very much for your assistance, you are a legend!
These menus worked in the past and I had made no changes to them, one day they just stopped working. I noticed the problem after we changed hosts. How could this happen? Could or would an update cause this to happen?

Hi,

On behalf of my colleague, you’re welcome and thank you for your kind words.

Not really sure what caused that, wordpress does not actually allow you to add a menu with a blank url.
It might have been corrupted during migration causing it to be blank.

Anyway glad to know it’s working now.

Have a nice day!

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