My WordPress site (on localhost) utilizes a <ul>
for a customized menu. How can I modify the CSS of a <li>
on hover specifically if it contains a <ul>
sub-menu?
Every main menu item has a border-radius but I want to eliminate this feature from the current item (Services, as shown below):
<div class="main-nav">
<ul class="menu" id="menu-main-nav">
<li><a href="#">Home</a></li>
<li><a href="#">Services</a>
<ul class="sub-menu">
<li><a href="#">Item One</a></li>
<li><a href="#>Item Two</a></li>
</ul>
</li>
<li><a href="#>Contact</a></li>
</ul>
</div>
I have attempted to find a CSS solution and even tried jQuery without success:
$('ul.sub-menu').parent().hover(function(){
$(this).addClass('no-radius');
});