forked from AustinCodingAcademy/javascript-workbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchangeOrder.js
More file actions
35 lines (19 loc) · 665 Bytes
/
changeOrder.js
File metadata and controls
35 lines (19 loc) · 665 Bytes
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
append
getElementBy
listArr.length
document.getElementById()
create button
const lastElement = document.getElementById('list-container').lastChild;
const arrow = document.createAttribute("id");
arrow.value = 'Arrow' + listArr.length;
lastElement.setAttributeNode(arrow);
document.lastElement.setAttributeNode
document.lastElement.addEventListener('click', () => {
let ArrowId = this.getAttribute('id');
const index = parseInt(this.getElementById('id');
let lowerNumber = listArr[index].order;
let higherNumber = lowerNumber - 1;
});
// Create a "class" attribute
// Set the value of the class attribute
h1.