I have looked at what seems to be a million examples of how to get the link a user clicks to change class, while ensuring the sibling links take their original class. I am very new to jQuery so admittedly I am lost when I try these different examples. Here is my css:
/*active link */
.current {
color: #f48239;
text-decoration: none;
}
/* inactive link*/
.link {
color: black;
text-decoration: none;
}
jQuery Function that only shows the div content that corresponds to the link being clicked:
$(document).ready(function(){
$('a').click(function () {
var divname= this.name;
$("#"+divname).show("fast").siblings().hide("fast");
});
});
And now the HTML:
<div id="left">
<UL><h2>DBACO Projects</h2></UL>
<div id="headerspace">
</div>
<UL ID="links"><LI><h6 style="display: inline;"><A class="link" HREF="#" NAME="QualcommInfo">QUALCOMM BUILDING M PROJECTS</A></h6></LI><BR>
<LI><h6 style="display: inline;"><A class="link" HREF="#" NAME="StFrancisInfo">ST FRANCIS OF ASSISI CATHOLIC COMMUNITY-PHASE 1</A></h6></LI><BR>
<LI><h6 style="display: inline;"><A class="link" HREF="#" NAME="YumaInfo">YUMA PIVOT POINT HOTEL AND CONFERENCE CENTER</A></h6></LI><BR>
<LI><h6 style="display: inline;"><A class="link" HREF="#" NAME="RealtyInfo">REALTY INCOME CORPORATE HEADQUARTERS</A></h6></LI><BR>
<LI><h6 style="display: inline;"><A class="link" HREF="#" NAME="CenterCityInfo">CENTER CITY MARRIOTT</A></h6></LI><BR>
<LI><h6 style="display: inline;"><A class="link" HREF="#" NAME="PalmInfo">PALM MOUNTAIN RESORT</A></h6></LI><BR>
<LI><h6 style="display: inline;"><A class="link" HREF="#" NAME="TrailsInfo">THE TRAILS AT PALM SPRINGS</A></h6></LI><BR>
<LI><h6 style="display: inline;"><A class="link" HREF="#" NAME="OtayInfo">OTAY LOGISTICS CENTER</A></h6></LI><BR>
<LI><h6 style="display: inline;"><A class="link" HREF="#" NAME="CabrilloInfo">CABRILLO MEDICAL OFFICE BUILDING</A></h6></LI><BR>
<LI><h6 style="display: inline;"><A class="link" HREF="#" NAME="NorthgateInfo">NORTHGATE COMMUNITY CHURCH</A></h6></LI><BR>
<LI><h6 style="display: inline;"><A class="link" HREF="#" NAME="LomaInfo">LOMA ALTA VILLAGE MOB</A></h6></LI></UL>
</div>
Any ideas on how to get the link clicked to take the class of "current" while ensuring all the other links stay with the class of "link" would be greatly appreciated.