Skip to content

Commit

Permalink
Minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alanrme committed Jul 4, 2024
1 parent db9d7a2 commit c5c1204
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ ready(() => {
if (rect.top < 0) {
header.classList.add("sticky")
listenerF = (event) => {
event.target.classList.add("active")
if (event.target.classList.contains("sticky")) {
event.target.classList.add("active")
}
event.target.removeEventListener("transitionend", listenerF)
}
header.addEventListener("transitionend", listenerF)
Expand Down

0 comments on commit c5c1204

Please sign in to comment.