Auto collapse main menu on mobile

BPSColruyt's picture
BPSColruyt
Fri, 10/28/2016 - 12:45
#1
Auto collapse main menu on mobile

Hi,

During testing, we noticed on mobile that when clicking a menu item, the page scrolls down to section, but the menu dropdown remains expanded on top of the page.

Image title

Is it possible to provide us a javascript extension that auto-collapses the dropdown on menu item click ?

This has in my opinion a better UX.

Thanks upfront,

khoa's picture
khoa
Sun, 10/30/2016 - 10:35

Hi,

Please give me FTP & Website account to access to http://hero2.rawdesk.be/. I'll help you.

Thanks!

khoa's picture
khoa
Mon, 10/31/2016 - 05:56

Hello,

I have made some changes on mobile menu as you wish. Please check it and what I did is adding a script:

$('.navbar-nav a').on('click', function() {    $('.navbar-collapse').toggleClass('in'); });

at the bottom of custom.js file(sites/all/themes/md_hero/js/front)

Thanks!

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.