JSFiddle - React, Tailwind, and code Playground

HTML

<div onclick="invis('one')" id="one"></div>
    <button onclick="domove()">hello</button>
    <div onclick="invis('two')"id="two"></div>
    <div onclick="invis('three')"id="three"></div>

<script type="text/javascript">
//Global variable to increment every function run
numberOfPixels = 10;
function domove()
    {
        $("one").style.left=numberOfPixels+'px';
        numberOfPixels += 10;
        setTimeout(domove,20);
    }
</script>

CSS

#one{width: 100px;
height: 50px;
float: left;
margin-right: 10px;
background-color: blue;
    position: relative;}