JSFiddle - React, Tailwind, and code Playground

HTML

<div id="red"></div>
<input type="button" id="clickme" value="Click Here">

CSS

#red {
    background: red;
    height: 100px;
    width: 100px;
}
#blue {
    background: blue;
    height: 100px;
    width: 100px;
}

JavaScript

/*function change() {
    var red = document.getElementById('red');
    red.id = "blue";
}

function init() {
   var clickme = document.getElementById('clickme');
   clickme.onclick = change;

}

window.onload = init;*/

$("input").click(function(){
    $("div").attr("id", "blue");
});