JSFiddle - React, Tailwind, and code Playground
by Aman0js
HTML
<div class="fillColor1"></div>
<div class="fillColor2"></div><br/>
<button>Click me</button>
CSS
.fillColor1 {
background: black;
height: 0;
margin-left: 24px;
position: relative;
width: 3px;
}
.fillColor2 {
background: black;
height: 0;
margin-left: 41px;
position: relative;
width: 3px;
}
JavaScript
function first(callback) {
alert('called first');
$('.fillColor1').animate({
height: '50px'
}, 600);
}
function second() {
alert('called second');
$('.fillColor2').animate({
height: '50px'
}, 600);
}
$('button').click(function() {
first(second);
});