From 299b40fcfbf95fa40aaa30a5e2d55900786f0c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=AB=20=E3=82=A6=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=96?= Date: Tue, 9 Oct 2018 14:15:53 -0500 Subject: [PATCH] Closes #176 --- app/dist/scripts/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/dist/scripts/app.js b/app/dist/scripts/app.js index 3a75921..20c2255 100755 --- a/app/dist/scripts/app.js +++ b/app/dist/scripts/app.js @@ -41,7 +41,8 @@ document.querySelectorAll("a[href^='#']").forEach(anchor => { anchor.addEventListener("click", event => { event.preventDefault(); - const element = event.target.href.split("#").pop(); + const element = event.target.href.split("#").pop() + .toLowerCase(); let elementOffset; if (document.getElementById(element)) { @@ -76,7 +77,8 @@ document.querySelector("[data-action='subscribe to newsletter']").onclick = () = function scrollToElementOnLoad() { if (window.location.href.includes("#")) { setTimeout(() => { // give page time to breathe - const element = window.location.href.split("#").pop(); + const element = window.location.href.split("#").pop() + .toLowerCase(); let elementOffset; if (document.getElementById(element)) {