Page 1 of 1
CSS Menu Jumping to top of page
Posted: Mon Apr 20, 2020 3:57 pm
by darkoracle
Hi
Whenever I create a CSS Menu it works perfectly fine on desktop but on any touch device clicking on a submenu does not just open the menu it also rockets you to the top of the page. The only sort of workaround I have found is to have it link to an anchor next to the menu but it's still not ideal.
Please help.
Re: CSS Menu Jumping to top of page
Posted: Mon Apr 20, 2020 5:00 pm
by Pablo
Maybe there is a conflict with other scripts on the page?
What is the URL?
Re: CSS Menu Jumping to top of page
Posted: Mon Apr 20, 2020 5:04 pm
by darkoracle
Pablo wrote: Mon Apr 20, 2020 5:00 pm
Maybe there is a conflict with other scripts on the page?
What is the URL?
http://www.jongspan.online/
Scroll to the bottom of the page and click on the top link, you will jump to the top of the page, hovering works a-ok but on touch devices, people obviously need to press on the link.
Thank you for looking into it.
Re: CSS Menu Jumping to top of page
Posted: Mon Apr 20, 2020 5:12 pm
by Pablo
A menu item with sub items should not have a link, because on mobile devices there is no 'hover' functionality.
So, the URL of the main item be empty.
Re: CSS Menu Jumping to top of page
Posted: Mon Apr 20, 2020 5:26 pm
by darkoracle
How do I that, have tried just leaving the link blank and the result is what you saw.
Re: CSS Menu Jumping to top of page
Posted: Mon Apr 20, 2020 5:31 pm
by BaconFries
You can simply use the following # were you would insert the url
Re: CSS Menu Jumping to top of page
Posted: Mon Apr 20, 2020 5:45 pm
by darkoracle
BaconFries wrote: Mon Apr 20, 2020 5:31 pm
You can simply use the following
# were you would insert the url
Well the way I am doing it is not working, here is a screenshot what am I doing wrong:

Re: CSS Menu Jumping to top of page
Posted: Mon Apr 20, 2020 6:09 pm
by Pablo
If you use "#' then this will tell the browser to jump to top of the page.
Re: CSS Menu Jumping to top of page
Posted: Mon Apr 20, 2020 6:29 pm
by darkoracle
Pablo wrote: Mon Apr 20, 2020 6:09 pm
If you use "#' then this will tell the browser to jump to top of the page.
Neither option works:
https://youtu.be/o5CRu74bROg
Re: CSS Menu Jumping to top of page
Posted: Mon Apr 20, 2020 6:39 pm
by crispy68
Set as follows:
Link to: External Web Address
URl: javascript:void(0)
Re: CSS Menu Jumping to top of page
Posted: Mon Apr 20, 2020 6:46 pm
by darkoracle
crispy68 wrote: Mon Apr 20, 2020 6:39 pm
Set as follows:
Link to: External Web Address
URl: javascript:void(0)
You, sir, are a certified badass

- Works
Pablo I think this should go in a fault report then, following the help file in the program only leads to frustration
