How can I stop javascript from moving the submenu when I click it?

I’m working on this site: http://editingplus.com.au

In the submenu Resource > Getting published, at some screen sizes when a link is clicked, instead of navigating to the link the submenu jumps to a different position and then closes. A second attempt at opening the menu and clicking the link works, but only if you try to click the same link–clicking a different link means you have to start again and click that link a further time.

This problem only occurs at smaller screen sizes where the Getting Published submenu doesn’t fit to the right of the Resources submenu. Clicking on the Getting Published submenu makes it jump briefly from the left to the right of the Resources submenu before closing. At larger screen sizes where the Getting Published submenu fits to the right of the Resources submenu, links work on first click.

This screenshot shows the situation of the Getting Published submenu being to the left. It’s when it’s like this that the menu jumps then closes.

This is a problem with JavaScript–if I disable JS on my browser and the site falls back to CSS only menus, the links work first time.

I haven’t made any custom menus. The site is using the Mins theme from GoDaddy, which is built off the Primer theme. As far as I can tell, neither of them are using any custom JS for the menus, and all the JS is standard WordPress JS.

I’m guessing I will need to add some custom JS to this site to stop the menus not working, or somehow disable the JS so the menus roll back to pure CSS, but I’m not sure how to do either of those things.

Any help would be much appreciated!

Read more here:: How can I stop javascript from moving the submenu when I click it?

Leave a Reply

Your email address will not be published. Required fields are marked *