From dce2c99a7ebdb1f98744b9f8f46ee4692f56fea7 Mon Sep 17 00:00:00 2001 From: Chuck Dries Date: Tue, 14 Feb 2017 04:02:08 -0700 Subject: [PATCH] Log everything --- index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.html b/index.html index 133e5d4..10f8215 100644 --- a/index.html +++ b/index.html @@ -21,8 +21,10 @@ function bgColor() { var p = ((window.innerHeight - window.scrollY) / window.innerHeight); //calulate ratio of scroll + console.log(p); x.innerHTML = " " + String(parseInt(p * 100)); //display it var rgb = Math.floor(Math.abs(1 - p) * 255); //set the color + console.log(rgb); var colorString = "rgb(" + rgb + "," + rgb + "," + rgb + ")"; document.body.style.backgroundColor = colorString; console.log(colorString);