+ left nav active style

This commit is contained in:
tix 2017-01-12 15:57:35 +08:00
parent a0f36bfaf7
commit c6deac85b6
3 changed files with 21 additions and 3 deletions

View File

@ -19,9 +19,15 @@
});
$('.navbar-nav li a').each(function () {
if ($(this).attr('href') == '/ei') {
console.log($(this).parent().addClass('active'));
$(this).parent().addClass('active');
}
});
$('.treeview ul.list-group li a').each(function () {
if ($($(this))[0].href == String(window.location)) {
$(this).parent().css("color", "#fff");
$(this).parent().css("background-color", "#428bca");
}
})
});
</script>
<%- include('comm/footer.html') %>

View File

@ -19,9 +19,15 @@
});
$('.navbar-nav li a').each(function () {
if ($(this).attr('href') == '/intro') {
console.log($(this).parent().addClass('active'));
$(this).parent().addClass('active');
}
});
$('.treeview ul.list-group li a').each(function () {
if ($($(this))[0].href == String(window.location)) {
$(this).parent().css("color", "#fff");
$(this).parent().css("background-color", "#428bca");
}
})
});
</script>
<%- include('comm/footer.html') %>

View File

@ -21,7 +21,13 @@
});
$('.navbar-nav li a').each(function () {
if ($(this).attr('href') == '/origin') {
console.log($(this).parent().addClass('active'));
$(this).parent().addClass('active');
}
});
$('.treeview ul.list-group li a').each(function () {
if ($($(this))[0].href == String(window.location)) {
$(this).parent().css("color", "#fff");
$(this).parent().css("background-color", "#428bca");
}
});
});