I have developed a unique sidebar menu that uses ajax calls to load pages.
<div class="sidebar">
<ul>
<li><a href='#' onclick="loadProfile()"><i class="icons user-login"></i>Customer Profile</a></li>
<li><a href='#' onclick="loadContacts()"><i class="icons user-login"></i>Report Incident</a></li>
<li><a href='#' onclick="loadPage()"><i class="menu complaint-box"></i>Incidents</a></li>
</ul>
</div>
Here is an example of an AJAX call:
function loadIncidentPage() {
$.ajax({
url: "" + AppName + "Pages/Page",
dataType: 'html',
success: function (data) {
//console.log(data);
$('#main').html(data);
}
});
}
I am working with MVC and would like to know how to change the color of links when clicked, then revert back to the initial style color when a different link is clicked.
Any suggestions on achieving this would be greatly appreciated!