wp_nav_menu add or remove sub-menu class in menu wordpress.

wordpress-menu.png
We can add additional class to submenu Suppose we have following structure:

In that case if we want

to like below: Use JQuery: $("#menu ul.sub-menu").each(function(){ $(this).removeClass('sub-menu'); });

Add class sub-menu item

use: