-
Notifications
You must be signed in to change notification settings - Fork 0
/
apps.js
38 lines (33 loc) · 1.04 KB
/
apps.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
// function bookmark(this){
// this.textContent = "Bookmarked";
// }
const bookmark = document.querySelector(".bookmark-container > p");
bookmark.onclick =()=>{
bookmark.innerHTML = 'Bookmarked';
}
console.log(bookmark);
const btn = document.querySelector(".menu-icon .btn");
let nav = document.querySelector(".nav-wrapper");
const close = document.querySelector(".close-menu");
// console.log(btn);
btn.onclick =()=>{
// alert('working');
nav.style.display = 'block';
btn.style.display = 'none';
}
close.onclick =()=>{
nav.style.display = 'none';
btn.style.display = 'block';
}
//modal section
// for an ID #PROJECT, CLASS .PROJECT, TAG PROJECT
const modal = document.querySelector('.modal');
const project = document.querySelector('.project');
const closeProject = document.querySelector('.closeProject')
project.onclick =()=>{
modal.style.display = 'block';
//alert('working'); // to check if the button is responding
}
closeProject.onclick =()=>{
modal.style.display = 'none';
}