JSFiddle - React, Tailwind, and code Playground
by b9chris
HTML
<div style="border-right:10px solid green;float:left">
<div id="first" class="od od_1" style="background-color:blue;width:100px; height: 100px;">I'm the first div</div>
<div id="second" class="od od2" style="background-color:red;width:200px; height: 100px;">I'm the second div</div>
</div>
<br clear=all/>
<input type="button" id="button" value="Click me to animate divs" />
CSS
body { background-color: #fff; font: 16px Helvetica, Arial; color: #000; }
div { display:block; margin: 0px; }
JavaScript
$(function() {
$('#button').click(function() {
$('#first').animate({ width: '200px' }, 200);
$('#second').animate({ marginTop: '50px' }, 200);
});
});