125
rated 0 times
[
128]
[
3]
/ answers: 1 / hits: 18997
/ 13 Years ago, fri, october 28, 2011, 12:00:00
I have the usual unordered list for a navigation menu with submenus...
html:
<ul>
<li><a href=#>Link 1</a></li>
<li>
<a href=#>Link with submenu</a>
<ul>
<li><a href=#>Sublink 1</a></li>
</ul>
</li>
</ul>
All of the links inside of the parent <li>
have a border radius. But if the parent <li>
has a child <ul>
, I don't want the link to have a radius.
I'm currently using this jQuery:
<script>
$(li).has(ul).addClass(sub-radius);
</script>
It works fine except it's targeting the <li>
, but I need it to target the child <a>
and remove its radius.
Any help would be appreciated.
More From » jquery