Jump to content

Top horizontal menu problem on mobile devices


Jurgenpalland

Recommended Posts

Just want to check that we're talking about the same thing.

 

Here's what we see on desktop and mobile:

 

http://imgur.com/a/RrT9q

 

Could you post a screenshot of what you're seeing on Desktop and describe what you think you shoud be seeing on mobile?

 

We're not sure what you mean by "doesn't work"?

 

Is it that before the menu collapses to its mobile version, it breaks over two lines?

Link to comment
Share on other sites

i'm really sorry, i said www.promomakerij.nl but i meant www.croford.com.

 

I'm working on two different site's at the moment and its a bit confusing :P.

 

The menu from promomakerij.nl works perfectly fine, but the same menu from www.croford.com isn't working on mobile browsers.

 

Sorry for the confussion.

Link to comment
Share on other sites

Do you know if there is any *.tpl files for the menu module under the themes "module" folder? If so you can try switching this too with the one that is working. (Just make sure it's the same version of the module) If this is not working I think I would have uninstalled the module from site that's not working and installed the one that is working (in both root and themes) If it still doesn't work I would take a look at the module positions and hooks on the page that is working, and make sure the page that doesn't work looks just the same.

Link to comment
Share on other sites

Could be a javascript issue linked with the facebook module - I can't debug the topblockmenu javascript because firebug doesn't get to load any javascript but instead gives this error:

 

Application Error: There was a problem getting data for the application you requested. The application may not be valid or there may be a temporary glitch. Please try again later.

 


 

Your other site isn't using the facebook module and is a difference worth investigating.

Edited by JeredBolton (see edit history)
Link to comment
Share on other sites

Also noticed a couple of things with your blocktopmenu.js file:

 

A couple of lines are missing from the ready function. Compare your working site:

$(document).ready(function(){
	categoryMenu = $('ul.sf-menu');
	mCategoryGrover = $('.sf-contener .cat-title');
	responsiveMenu();
	$(window).resize(responsiveMenu);
});

with the broken site:

$(document).ready(function(){
	responsiveMenu();
	$(window).resize(responsiveMenu);
});

However, the biggest difference is that the working site is using $(window).width() in the responsiveMenu function:

function responsiveMenu()
{
    if ($(window).width() <= 767 && responsiveflagMenu == false) {
        menuChange('enable');
        responsiveflagMenu = true;
    } else if ($(window).width() >= 768) {

Whereas the site with the broken menu is using $(document).width() in the responsiveMenu function:

function responsiveMenu()
{
   if ($(document).width() <= 767 && responsiveflagMenu == false)
	{
		menuChange('enable');
		responsiveflagMenu = true;
	}
	else if ($(document).width() >= 768)

Even if the window is shrunk down the document width can be far wider than window.

 

In this case my debugger shows that the document width is returning a value well over 2000 which is why the menuChange function is never called to activate the mobile menu.

 

By manipulating the width value in the debugger I can get it to call the mobielInit function and the mobile menu works as expected.

Link to comment
Share on other sites

Thank you all!

 

I've re-installed the complete module Horizontal Top Menu. This didn't fix the problem.

 

I've copyed the JS file from Promomakerij.nl to Croford.com, this also didn't work.

 

I've manualy added the missing lines to the JS file en chaned document into window..... didn't work.

 

I've deleted all social media modules, but stil on the top of the page the facebook logo is on the site.

I get the feeling the problem starts with that icon.

As far as i can see, this not a module, but i also cant find the correct file in witch i could delete the info.

Link to comment
Share on other sites

i've just changed the code to:

 

function responsiveMenu()
{
   if ($(window).width() <= 767 && responsiveflagMenu == false)
{
menuChange('enable');
responsiveflagMenu = true;
}
else if ($(window).width() >= 768)
{
menuChange('disable');
responsiveflagMenu = false;
}
}
 
In the blocktopmenu.js file and uploaded it to the server.
After that i've emptyed the cache.
Link to comment
Share on other sites

  • 6 months later...
  • 4 months later...

My friends.... I have the same problem.... the TOP horizontal menu, NOT working only in mobile... :(

can anyone help ?

and one more problem.... 

in tm megamenu in mobile, when you click on ^ or down, show the subcategories (submenu) and HIDE in 1 sec... :((((

 

I have two this problems in my mobile site... can anyone help me?

my site url is : http://msreklama.gr

Thanks !!!

Link to comment
Share on other sites

  • 11 months later...

I still have the same problem on mobile device:

image.png.71e5f0b13a37b7705cfd1e6e5d2e2615.png

Next problem is when I open web in ipad. After click on button menu, not happen (the menu does not open ). I tried it on computer, menu not working when page width is 768 - 970.

Please help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...