Skip to content

Commit

Permalink
Bugfix: Make selector more restrictive
Browse files Browse the repository at this point in the history
  • Loading branch information
georgmaisser committed Nov 26, 2024
1 parent 5007492 commit 96ef1fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion amd/build/anchor.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/anchor.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/src/anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const init = () => {
}

// Optional: Toggle collapse on clicking the anchor link
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
document.querySelectorAll('#page-local-wb_news-index a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", (e) => {
const target = document.querySelector(e.currentTarget.getAttribute("href"));
if (target && target.classList.contains("collapse")) {
Expand Down

0 comments on commit 96ef1fa

Please sign in to comment.