From 043e32cb67e35de3a37673cd6e82d90dd1d49fd3 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 18 Jan 2021 22:45:24 +0100 Subject: [PATCH] make the boxes toggleable --- basics-10-styling-starting-setup/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/basics-10-styling-starting-setup/app.js b/basics-10-styling-starting-setup/app.js index f8abbdc..24d9260 100644 --- a/basics-10-styling-starting-setup/app.js +++ b/basics-10-styling-starting-setup/app.js @@ -11,11 +11,11 @@ const app = Vue.createApp({ methods: { boxSelected(box) { if (box === "A") { - this.boxASelected = true; + this.boxASelected = !this.boxASelected; } else if (box === "B") { - this.boxBSelected = true; + this.boxBSelected = !this.boxBSelected; } else if (box === "C") { - this.boxCSelected = true; + this.boxCSelected = !this.boxCSelected; } }, },