CSSmenu keep open without hovering

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
kimmbob
New Member
New Member
Posts: 5
Joined: Tue Jul 03, 2018 3:43 pm

CSSmenu keep open without hovering

Post 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?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CSSmenu keep open without hovering

Post 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.
Not getting the answer you need? CMSMS support options
Post Reply

Return to “Layout and Design (CSS & HTML)”