My task is to click an HREF list item, make it bold and make the others normal. Todo this I need to execute a simple class switch. I current get no errors at inspect, it just does nothing. Do server tags (asp:hyperlink which equates to a href) make a difference? Here's my code...
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SmuSideNavigationSublayout.ascx.cs" Inherits="SmuSideNavigation.layouts.ProjectX.sublayouts.SmuSideNavigationSublayout" %>
<style type="text/css">
.selected_Turn {
font-weight: normal;
}
.selected_Turn_on {
font-weight: bold;
}
</style>
<div id="smuSideNav" class="selTurn">
<ul class="nav nav-list">
<li class="nav-header home"><asp:HyperLink runat="server" ID="hypParent" CssClass="selected_Turn"/></li>
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<li><asp:HyperLink runat="server" ID="hypChild" CssClass="selected_Turn"/></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div>
<script type="text/javascript">
jQuery('.selTurn a').click(function () {
jQuery('.selTurn a').removeAttr('class'); // remove all classes
jQuery(this).attr('class', this.className + "_on");
});
</script>