mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-03-31 14:24:16 +02:00
Added remove of current
This commit is contained in:
parent
af27d50214
commit
be62b72e90
@ -34,6 +34,9 @@
|
|||||||
if (href && href.trim().startsWith("#")) {
|
if (href && href.trim().startsWith("#")) {
|
||||||
if (href.trim() === currentHash.trim()) {
|
if (href.trim() === currentHash.trim()) {
|
||||||
console.log("initCurrentNav: Match found for hash-only link:", href);
|
console.log("initCurrentNav: Match found for hash-only link:", href);
|
||||||
|
document.querySelectorAll('.current-index a.reference.internal.current').forEach(function(link) {
|
||||||
|
link.classList.remove("current");
|
||||||
|
});
|
||||||
link.classList.add("current");
|
link.classList.add("current");
|
||||||
markAsCurrent(link);
|
markAsCurrent(link);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user