How would I go about selecting a child element of a previous element. I know how to select the previous element using .prev(), but how do I selected the child element of that previous element so that I can modify the CSS? Thanks for any help.
jQuery:
$("li.selected").prev().css("border-right", "none");
EDIT:
I would like only the element before the element with the "selected" class to have css style applied to it. Currently all elements are having the css selector applied. Thanks.
<ul id="nav_1510737">
<li><a href="/about">About</a></li>
<li class="selected"><a href="/bookkeeping">Bookkeeping</a></li>
<li><a href="/ms-office-support">MS Office Support</a></li>
<li><a href="/office-organization">Office Organization</a></li>
<li><a href="/virtual-services">Virtual Services</a></li>
<li><a href="/grant-writing">Grant Writing</a></li>
<li><a href="/contact">Contact</a></li>
</ul>