From 1bce8946a5b050685bdd7a63da016bc152bf7c2d Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 8 Feb 2021 13:51:00 +0100 Subject: starting portfolio --- docs/assets/js/site.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/assets/js/site.js') diff --git a/docs/assets/js/site.js b/docs/assets/js/site.js index b3e9e39..6549405 100644 --- a/docs/assets/js/site.js +++ b/docs/assets/js/site.js @@ -28,6 +28,10 @@ const site = (function(){ }, 0) toArray(document.querySelectorAll('.menu a')).forEach(a => { a.addEventListener("click", e => { + if (e.target.getAttribute('href').indexOf('#') === -1) { + sounds.play('click') + return + } e.preventDefault() sounds.play('click') console.log(e.target) -- cgit v1.2.3-70-g09d2