$(document).ready(function() {
var link = window.location.href;
$('.nav li.active').removeClass('active');
$('.nav li a').each(function() {
if ($(this).attr('href') == link) {
$(this).parent('li').addClass('active');
};
});
});
<script>
function editUser(id) {
$.ajax({
type: 'POST',
url: '/frontend/users_admin/edit',
data: "id=" + id,
dataType: 'json',
success: function(data){
$.each(data, function(){
$('#loginEdit').val(this.login);
$('#emailEdit').val(this.email);
});
}
});
}
</script>