From be6b6b461bc912c54b1703c44ba72f5c7f53ec77 Mon Sep 17 00:00:00 2001 From: p0wen Date: Mon, 28 Sep 2020 19:53:59 +0000 Subject: [PATCH] update data atttribute on button --- assets/js/scripts/app.js | 2 +- index.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/js/scripts/app.js b/assets/js/scripts/app.js index 747afe3..5758085 100644 --- a/assets/js/scripts/app.js +++ b/assets/js/scripts/app.js @@ -407,7 +407,7 @@ function changeBackground() { let bgimage = ""; changeBackgroundBTN.forEach((option) => { option.addEventListener("click", function () { - bgimage = this.getAttribute("bg-img"); + bgimage = this.getAttribute("data-bg"); if (bgimage == "morning") { // Use Morning Background document.getElementById("myDiv").style.backgroundImage = diff --git a/index.html b/index.html index 2e3cf75..ad4df9c 100644 --- a/index.html +++ b/index.html @@ -245,7 +245,7 @@
Background