diff --git a/carMaker/carMaker.html b/carMaker/carMaker.html index 149d115..1dba625 100644 --- a/carMaker/carMaker.html +++ b/carMaker/carMaker.html @@ -84,7 +84,7 @@
You can create your cars in
-
+
diff --git a/carMaker/carMaker.js b/carMaker/carMaker.js index 76c444a..9a5b910 100644 --- a/carMaker/carMaker.js +++ b/carMaker/carMaker.js @@ -6,10 +6,16 @@ function getValues() { // Add event listener to the button document.getElementById('createNow').addEventListener('click', getValues); +var currentColor = NaN; +var lastColor = NaN; function colorChange() { + lastColor = currentColor; var color = document.getElementById("colorSelect").value; - console.log("color has change" + color); + currentColor = color; + console.log("current color: " + currentColor); + console.log("last color: " + lastColor); + document.getElementById("carPreview").style.backgroundColor = color; }