diff --git a/app.js b/app.js
index 52ac219..9c2faad 100644
--- a/app.js
+++ b/app.js
@@ -13,19 +13,23 @@ for (i = 0; i < myNodelist.length; i++) {
var close = document.getElementsByClassName("close");
var i;
for (i = 0; i < close.length; i++) {
- close[i].onclick = function() {
+ close[i].onclick = function () {
var div = this.parentElement;
div.style.display = "none";
- }
+ };
}
// Add a "checked" symbol when clicking on a list item
-var list = document.querySelector('ul');
-list.addEventListener('click', function(ev) {
- if (ev.target.tagName === 'LI') {
- ev.target.classList.toggle('checked');
- }
-}, false);
+var list = document.querySelector("ul");
+list.addEventListener(
+ "click",
+ function (ev) {
+ if (ev.target.tagName === "LI") {
+ ev.target.classList.toggle("checked");
+ }
+ },
+ false
+);
// Create a new list item when clicking on the "Add" button
function newElement() {
@@ -33,7 +37,7 @@ function newElement() {
var inputValue = document.getElementById("myInput").value;
var t = document.createTextNode(inputValue);
li.appendChild(t);
- if (inputValue === '') {
+ if (inputValue === "") {
alert("You must write something!");
} else {
document.getElementById("myUL").appendChild(li);
@@ -47,9 +51,9 @@ function newElement() {
li.appendChild(span);
for (i = 0; i < close.length; i++) {
- close[i].onclick = function() {
+ close[i].onclick = function () {
var div = this.parentElement;
div.style.display = "none";
- }
+ };
}
}
diff --git a/index.html b/index.html
index d7fa301..5aef2c9 100644
--- a/index.html
+++ b/index.html
@@ -1,16 +1,23 @@
-
-