-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
31 lines (28 loc) · 851 Bytes
/
script.js
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
27
28
29
30
31
// this is for hamburger menu
function toggleMenu() {
const menu = document.querySelector(".menu-links");
const icon = document.querySelector(".hamburger-icon");
menu.classList.toggle("open");
icon.classList.toggle("open");
}
// this is for theme dark and light
var theme = document.getElementById("theme");
theme.onclick = function () {
document.body.classList.toggle("dark-theme");
if (document.body.classList.contains("dark-theme")) {
theme.src = "./images/sun.png";
} else {
theme.src = "./images/moon.png";
}
};
theme.addEventListener('click',()=>{
console.log('button is click');
})
// for coder for skills slider library is used which is type.js
var typeData = new Typed(".role", {
strings: ["Frontend Developer", "Web developer", "coder"],
loop: true,
typeSpeed: 100,
backSpeed: 80,
backDelay: 1000,
});