Skip to content

Commit

Permalink
Update and rename script.js to script.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
KrishnaSSH authored Mar 26, 2024
1 parent d93636e commit 42c344c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions static/script.js → static/script.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
document.addEventListener('DOMContentLoaded', function() {
const hamburger = document.getElementById('hamburger');
const menu = document.querySelector('nav');
document.addEventListener('DOMContentLoaded', () => {
const hamburger = document.getElementById('hamburger') as HTMLElement;
const menu = document.querySelector('nav') as HTMLElement;

hamburger.addEventListener('click', function() {
hamburger.addEventListener('click', () => {
menu.classList.toggle('show');
});

Expand Down

0 comments on commit 42c344c

Please sign in to comment.