mirror of https://github.com/itflow-org/itflow
highlight current page on side nav
This commit is contained in:
parent
cb2eefe8d4
commit
13723fb3c5
12
js/app.js
12
js/app.js
|
|
@ -40,17 +40,9 @@ $('#dT').dataTable( {
|
|||
|
||||
});
|
||||
|
||||
//Highlight top nav menu item with current page
|
||||
// Highlight the active nav link on side nav
|
||||
$(function() {
|
||||
// Highlight the active nav link.
|
||||
var url = window.location.pathname;
|
||||
var filename = url.substr(url.lastIndexOf('/') + 1);
|
||||
$('.navbar a[href$="' + filename + '"]').parent().addClass("active");
|
||||
});
|
||||
|
||||
$(function() {
|
||||
// Highlight the active nav link.
|
||||
var url = window.location.pathname;
|
||||
var filename = url.substr(url.lastIndexOf('/') + 1);
|
||||
$('.nav a[href$="' + filename + '"]').parent().addClass("active");
|
||||
$('.navbar-nav a[href$="' + filename + '"]').parent().addClass("active");
|
||||
});
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<!-- Sidebar -->
|
||||
<ul class="sidebar navbar-nav d-print-none">
|
||||
<li class="nav-item active">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="dashboard.php">
|
||||
<i class="fas fa-fw fa-tachometer-alt mx-2"></i>
|
||||
<span>Dashboard</span>
|
||||
|
|
|
|||
Loading…
Reference in New Issue