How do I change a Underscores.me theme nav dropdown function from on hover to on click?

[ad_1]

Like the title says, I am custom coding a website using a blank [Underscores.me]) theme. On the main navigation the default function for a nav dropdown is on hover, how would I change it to on click? Its my belief that on click navigations are better than on hover for people with disabilities right? I have used [Underscores.me]) for about 3 years now and I love it, but I always just custom coded a navigation on the header.php, but that makes editing the navigation on the client side almost impossible without editing the php file. Im just trying to take advantage of the wordpress menus feature.

[ad_2]
1 Comment
  1. Underscores requires you have a solid understanding of full stack development. You need to write all the code for how your entire site looks and functions. In this case, you’re writing css and JS, not php. You’re capturing JS `click` events and applying a css class to display the submenu.

    Header.php already contains the necessary code to load the menu from the WP menu builder
    You should not be hardcoding the menu into the header file.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer