Hi there, I'm trying to style a navigation bar using CSS. I'm pulling the navigation bar values from a database using Ajax.ActionLink. I attempted to use JavaScript but encountered an error stating
"jQuery is not defined",
Here's the code I have so far. Test_Section is my Model.
<table style="width:auto">
@foreach (Test_Section p in Model)
{
<tr>
<td>
<div id="ajaxnav" class="navbar-left">
<ul class="nav nav-tabs nav-stacked">
<li>
@Ajax.ActionLink(p.SectionName, p.Title, new { id = p.StdSectionId , @class = "navigationLink"},
new AjaxOptions
{
UpdateTargetId = "getHtml",
InsertionMode = InsertionMode.Replace,
HttpMethod = "GET"
}, new { style = "color:#428bca" , @class = "navigationLink" })
</li>
</ul>
</div>
</td>
</tr>
}
</table>
<script type="text/javascript">
$('.navigationLink').click(function () {
$('.navigationLink').removeClass('active');
$(this).addClass('active');
});
</script>
I would appreciate any assistance with this issue. Thank you!