diff --git a/code/Brandon/javascript/lab05/index.html b/code/Brandon/javascript/lab05/index.html new file mode 100644 index 00000000..9aba05ad --- /dev/null +++ b/code/Brandon/javascript/lab05/index.html @@ -0,0 +1,27 @@ + + + + + + + To Do List + + + + + +
+ + + + + +
+ + \ No newline at end of file diff --git a/code/Brandon/javascript/lab05/script.js b/code/Brandon/javascript/lab05/script.js new file mode 100644 index 00000000..49d02351 --- /dev/null +++ b/code/Brandon/javascript/lab05/script.js @@ -0,0 +1,25 @@ +const App = { + data() { + return { + message: "welcome to Vue", + inputText: "", + listItems: [], + }; + }, + methods: { + clickButton() { + this.listItems.push({ + task: this.inputText, + complete: false, + }); + inputText = ""; + }, + deleteItem() { + var elem = document.getElementById("del"); + elem.parentNode.remove(elem); + }, + }, +}; + +const app = Vue.createApp(App); +app.mount("#app"); diff --git a/code/Brandon/javascript/lab05/style.css b/code/Brandon/javascript/lab05/style.css new file mode 100644 index 00000000..0ac71b8d --- /dev/null +++ b/code/Brandon/javascript/lab05/style.css @@ -0,0 +1,3 @@ +.complete { + text-decoration:line-through; +}