diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-02-08 13:51:00 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-02-08 13:51:00 +0100 |
| commit | 1bce8946a5b050685bdd7a63da016bc152bf7c2d (patch) | |
| tree | 3bda508238b410a7816718db36750493113a9d27 /docs/assets/js/site.js | |
| parent | 6d0dd7676a221e888fb2746c510aaaa77f4e316b (diff) | |
starting portfolio
Diffstat (limited to 'docs/assets/js/site.js')
| -rw-r--r-- | docs/assets/js/site.js | 4 |
1 files changed, 4 insertions, 0 deletions
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) |
