-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
26 lines (20 loc) · 727 Bytes
/
Copy pathscript.js
File metadata and controls
26 lines (20 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
window.addEventListener('scroll', function() {
const navbar = document.getElementById('navbar');
const item = document.getElementById('item')
if (window.scrollY > 50) {
navbar.classList.add('scrolled');
} else {
navbar.classList.remove('scrolled');
}
});
document.querySelector("#contactForm").addEventListener("submit", function(e) {
e.preventDefault();
success();
});
function success() {
document.getElementById("successText").innerHTML = " <b> Successfully submitted! ✅ </b>";
}
/* particlesJS.load(@dom-id, @path-json, @callback (optional)); */
particlesJS.load('particles-js', 'assets/particles.json', function() {
console.log('particles loaded!');
});