-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnotes.js
More file actions
78 lines (76 loc) · 2.7 KB
/
notes.js
File metadata and controls
78 lines (76 loc) · 2.7 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
const firstheading=document.querySelector(".heading");
const secondheading=document.querySelector(".secondheading");
const newaddbutton=document.querySelector(".fa-plus-circle");
const backarrow=document.querySelector(".fa-arrow-left");
const notecontent=document.querySelector(".notescontent");
const bodycontent=document.querySelector(".body");
const bottomcontent=document.querySelector(".newnotes");
const sidebarbtn=document.querySelector(".fa-reorder");
const sidebarcontent=document.querySelector(".sidebar");
const sidenotepara=document.querySelector(".abovesidecontent");//Notes in SideBar
const deletebtn=document.querySelector(".fa-trash");
const noteboxcontent=document.querySelector(".notebox");
const savebtn=document.querySelector(".rightitem p");
const titlebox=document.querySelector("#inputcontent");
const paracontent=document.querySelector("#textcontent");
console.log(paracontent);//
newaddbutton.addEventListener("click",()=>
{
firstheading.style.display="none";
bodycontent.style.display="none";
newaddbutton.style.display="none";
bottomcontent.style.display="none";
secondheading.style.display="flex";
notecontent.style.display="flex";
})
backarrow.addEventListener('click',()=>
{
firstheading.style.display="flex";
secondheading.style.display="none";
notecontent.style.display="none";
bodycontent.style.display="flex";
newaddbutton.style.display="flex";
bottomcontent.style.display="flex";
})
sidebarbtn.addEventListener("click",()=>
{
firstheading.style.display="none";
secondheading.style.display="none";
bodycontent.style.display="none";
bottomcontent.style.display="none";
sidebarcontent.style.display="flex";
})
sidenotepara.addEventListener("click",()=>
{
firstheading.style.display="flex";
// secondheading.style.display="flex";
bodycontent.style.display="grid";
bottomcontent.style.display="flex";
sidebarcontent.style.display="none";
})
// deletebtn.addEventListener("click",()=>
// {
// noteboxcontent.style.display="none";
// // bodycontent.style.display="none";
// })//wait
savebtn.addEventListener("click",()=>
{
notecontent.style.display="none";
secondheading.style.display="none";
firstheading.style.display="flex";
bodycontent.style.display="flex";
newaddbutton.style.display="flex";
bottomcontent.style.display="flex";
const notesbox=document.createElement("div");
const insidenotesbox=`<h3>${titlebox.value}</h3>
<p>
${paracontent.value}
</p>`
notesbox.innerHTML=insidenotesbox;
console.log(insidenotesbox);
console.log(notesbox);
bodycontent.append(notesbox);
titlebox.value="";
paracontent.value="";
})
//initial initialisation problem occured