Page 1 of 1

CSSmenu keep open without hovering

Posted: Fri Jul 06, 2018 9:23 am
by kimmbob
Hey there,

i built a template for a touch screen kiosk display. And I want to use the horizontal cssmenu. I would like to keep the menu open once clicked, and not close as soon as there is not hover on the item anymore.
How can I do that?

Re: CSSmenu keep open without hovering

Posted: Fri Jul 06, 2018 2:44 pm
by DIGI3
Because you don't need to keep hover compatibility, you could change the :hover css styles to be unique classes, then add a jQuery/js onclick event to the parent menu items that adds that class, and one to remove it when clicking outside of the menu.

If you're using a framework such as Bootstrap or Foundation, their dropdown menus are already touch-friendly, so you may find it easier to just create a Navigator template for that.