Skip to content

Commit 587e9c6

Browse files
author
roberttss
committed
komit 9
1 parent ea43f27 commit 587e9c6

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

‎app.js‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
1-
// testa komits 1
2-
testa komits 2
1+
var btns = document.querySelectorAll('#book-list .delete');
2+
3+
Array.from(btns).forEach(function(btn){
4+
btn.addEventListener('click', function(e){
5+
6+
const.li = e.target.parentElement;
7+
li.parentNode.removeChild(li)
8+
9+
});
10+
11+
});
12+
13+
const link = document.querySelector('#page-banner a');
14+
15+
link.addEventListener('click', function(e){
16+
e.preventDefault();
17+
console.log('navigation to ', e.target.textContent, 'was prevented');
18+
})

0 commit comments

Comments
 (0)