Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
badebf6
commit a6785f8
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
/* | ||
Highlight the li element with href link to the current page in the left sidebar | ||
Since 11 2019 | ||
Since Nov 2019 | ||
*/ | ||
|
||
document.documentElement.className="hasJS"; | ||
|
||
$(function(){ | ||
var $page = window.location.href; | ||
$('a').each(function() { | ||
if ($(this).prop('href') == window.location.href) { | ||
if ($(this).prop('href') == $page) { | ||
$(this.parentNode).addClass('here'); | ||
} | ||
}); | ||
}) | ||
}); |