JSFiddle - React, Tailwind, and code Playground
by ajthomascouk
HTML
<span id="box"> </span>
<p><span id="plus">+</span> <span id="minus">-</span></p>
CSS
#box{height:80px; width:80px; border:2px solid black; background-color:red; display:block;}
JavaScript
$('#plus').click(function() {
$('#box').animate({marginLeft: '+=50px'});
});
$('#minus').click(function() {
$('#box').animate({marginLeft: '-=50px'});
});