JSFiddle - React, Tailwind, and code Playground
by araknafobia
HTML
<button id="button">Try it</button>
<div id="myDIV">
<h1>some text</h1>
</div>
CSS
#myDIV{
background:blue;
width:250px;
color:white;
}
JavaScript
function myFunction() {
// Code for Chrome, Safari, Opera
document.getElementById("myDIV").style.WebkitTransform = "translate(20px)";
document.getElementById("myDIV").innerHtml =" asd";
// Code for IE9
document.getElementById("myDIV").style.msTransform = "translate(20px)";
// Standard syntax
document.getElementById("myDIV").style.transform = "translate(20px)";
}
document.getElementById("button").addEventListener("click", function(){
myFunction();});