Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.getElementById('add').onclick = function () {
- var d = document.getElementById('in').value;
- var temp = {};
- temp.todo = d;
- temp.checked = false;
- todoList.push(temp);
- var newEl = document.createElement('div');
- for (let i = 0; i < todoList.length; i++) {
- const now = todoList[i].todo;
- const ck = todoList[i].checked;
- const ht = `
- <div>
- <label class="checkbox-container">
- ${now}
- <input type="checkbox">
- <span class="checkmark"></span>
- </label>
- <div></div>
- </div>`;
- newEl.innerHTML = ht;
- list.appendChild(newEl);
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement