From 0963509f2b052ee81e94dde31c77585eb29c6201 Mon Sep 17 00:00:00 2001 From: DaniIliev <114102749+DaniIliev@users.noreply.github.com> Date: Sun, 3 Mar 2024 09:08:26 +0200 Subject: [PATCH 1/3] update readme.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4abcf1f..9d5de60 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ -# Towns for SoftUni -Code for the Git and GitHub Exercise +· {Dani1} takes the role "Editor" + +· {Dani2} takes the role "Shuffler" + +· {Dani3} takes the role "Styler" From 651c06e800a477822e2ff71db04bcb2521bca3a6 Mon Sep 17 00:00:00 2001 From: DaniIliev <114102749+DaniIliev@users.noreply.github.com> Date: Sun, 3 Mar 2024 09:17:29 +0200 Subject: [PATCH 2/3] create add button and add functionality --- towns.html | 4 ++++ towns.js | 36 ++++++++++++++++++++---------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/towns.html b/towns.html index d7a7960..dc4c12d 100644 --- a/towns.html +++ b/towns.html @@ -22,6 +22,10 @@

Towns

+
+ + +
diff --git a/towns.js b/towns.js index 6f50af6..52bac8a 100644 --- a/towns.js +++ b/towns.js @@ -1,19 +1,23 @@ -$(document).ready(function() { - $('#btnDelete').click(deleteTown) +$(document).ready(function () { + $("#btnDelete").click(deleteTown); + $('#btnAdd').click(addTown); }); - +function addTown() { + let townName = $("#townNameForAdd").val(); + $("#townNameForAdd").val(""); + $("#towns").append($("