JSFiddle - React, Tailwind, and code Playground
by omarqa
HTML
<button id="btn1">button 1</button>
<button id="btn2">button 2</button>
<button id="btn3">button 3</button>
CSS
#btn3,#btn2
{
position:relative;
}
JavaScript
var topCount = 10;
var LeftCount = 0;
setInterval(function()
{
topCount+=(Math.random()*10)-5;
LeftCount+=(Math.random()*10)-5;
$('#btn3,#btn2').css('top',topCount);
$('#btn3,#btn2').css('left',LeftCount);
},100);