JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/jquery-1.9.0rc1.js"></script>
<button id="start">Click me</button>
<div id="test"></div>
CSS
#test {
position: absolute;
background : red;
top : 30px;
left : 30px;
padding : 60px;
width : 30px;
height : 30px;
}
JavaScript
var start = {
top : 30,
left : 30,
width : 30,
height : 30
};
var end = {
top : 30,
left : 250,
width : 30,
height : 30
}
$("#start").click(function() {
$("#test").stop(true).css(start).animate(end, 2000);
});