generated from alchemycodelab/dev-101-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
28 lines (25 loc) · 1.04 KB
/
app.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
// const booger = document.getElementById('nametag')
// booger.style.background = 'purple';
const nameDisplay = document.getElementById('name-display');
const nameInput = document.getElementById('name-input');
const pronounsDisplay = document.getElementById('pronouns-display');
const pronounInput = document.getElementById('pronoun-input');
const button = document.getElementById('update-button');
button.addEventListener('click', () => {
console.log('i am clicking the button');
console.log(nameDisplay);
console.log(pronounsDisplay)
// nameDisplay.textContent = 'Julie';
// nameDisplay.style.color = 'red';
nameDisplay.textContent = nameInput.value;
pronounsDisplay.textContent = pronounInput.value;
});
// not working yet \/
const guestButton = document.getElementById('guest-button');
guestButton.addEventListener('click', () => {
roleDisplay.textContent = 'Event Guest';
});
const staffButton = document.getElementById('staff-button');
staffButton.addEventListener('click', () => {
roleDisplay.textContent = 'Event Staff';
});