forked from Arman-ali-khan-786/CardUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
40 lines (34 loc) · 1.52 KB
/
index.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
32
33
34
35
36
37
38
39
40
// add you code here
// darkModeBtn
const darkModeBtn = document.querySelector('.dark-mode-btn');
const header = document.querySelector('header');
const headerTag = document.querySelectorAll('.header-tag');
const body = document.querySelector('body');
const effectCode = document.querySelectorAll('.effect-code');
const em = document.querySelectorAll('em');
const wantToContribute = document.querySelector('.want-to-contribute');
darkModeBtn.addEventListener('click', () => {
darkModeBtn.classList.toggle('active');
//changing the theme color
header.classList.toggle('active');
headerTag.forEach((e)=>{
e.classList.toggle('active');
});
body.classList.toggle('active');
effectCode.forEach((e)=>{
e.children[0].classList.toggle('active');
});
em.forEach((e)=>{
e.classList.toggle('active');
});
wantToContribute.classList.toggle('active');
});
// ---------------------------------- Ui-3 Js code -------------------------------------
// ---------------------------------- Ui-4 Js code -------------------------------------
// ---------------------------------- Ui-7 Js code starts here -------------------------------------
const img = document.querySelector("img");
const icons = document.querySelector(".icons");
img.onclick = function(){
this.classList.toggle("active");
icons.classList.toggle("active");}
// ---------------------------------- Ui-7 Js code ends here -------------------------------------