-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
22 lines (19 loc) · 691 Bytes
/
Copy pathscript.js
File metadata and controls
22 lines (19 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/**
* Academic Personal Website - Minimal JavaScript
* Handles mobile navigation toggle only
*/
document.addEventListener('DOMContentLoaded', function() {
const navToggle = document.getElementById('navToggle');
const navMenu = document.getElementById('navMenu');
if (navToggle && navMenu) {
navToggle.addEventListener('click', function() {
navMenu.classList.toggle('active');
});
// Close menu when clicking a link (for mobile)
navMenu.querySelectorAll('a').forEach(function(link) {
link.addEventListener('click', function() {
navMenu.classList.remove('active');
});
});
}
});