We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d771cd0 commit dfb6052Copy full SHA for dfb6052
1 file changed
15 - LocalStorage/index-START-y.html
@@ -28,7 +28,7 @@ <h2>LOCAL TAPAS</h2>
28
<script>
29
const addItems = document.querySelector('.add-items');
30
const itemsList = document.querySelector('.plates');
31
- const items = [];
+ const items = JSON.parse(localStorage.getItem('items')) || [];
32
33
function addItem(e){
34
e.preventDefault();
@@ -58,8 +58,15 @@ <h2>LOCAL TAPAS</h2>
58
}).join('');
59
}
60
61
+ function toggleDone(e){
62
+
63
+ }
64
65
addItems.addEventListener('submit', addItem);
66
+ populateList(items, itemsList);
67
68
+ const checkboxes = document.querySelectorAll('input');
69
+ checkboxes.forEach(input =>input.addEventListener('click', () => alert('hi')));
70
</script>
71
72
0 commit comments