I am currently working on creating a navigation bar that features rounded corners for the first and last children within an unordered list. My goal is to utilize the onclick javascript function to dynamically assign these rounded corners directly in JavaScript. Below is the snippet of code I have attempted to use. If anyone could provide insight into what may be causing issues or suggest a solution or resource, it would be greatly appreciated. Thank you in advance.
HTML:
<nav>
<ul id="navBar">
<li><a href="#" title="View"><div class="menu" onClick="select(this)">View</div></a></li>
<li><a href="#" title="Duplicate"><div class="menu" onClick="select(this)">Duplicate</div></a></li>
<li><a href="#" title="Edit"><div class="menu" onClick="select(this)">Edit</div></a></li>
<li><a href="#" title="Delete"><div class="menu" onClick="select(this)">Delete</div></a></li>
</ul>
</nav>
Javascript:
document.getElementById('ul#navBar li:first-child').style.MozBorderRadiusTopleft = '13px';
document.getElementById('ul#navBar li:first-child').style.MozBorderRadiusBottomleft = '13px';
document.getElementById('ul#navBar li:last-child').style.MozBorderRadiusTopRight = '13px';
document.getElementById('ul#navBar li:last-child').style.MozBorderRadiusBottomRight = '13px';