JSFiddle - React, Tailwind, and code Playground

by jonathanmh

HTML

<div id="colour"> </div>

CSS

html, body, #colour {
    background: black;
    height: 100%;
    width: 100%;
}

JavaScript

var element = document.getElementById("colour");
element.addEventListener("click",function(e){
    console.log(e)
	element.style.background = '#ffffff';
},false);