JSFiddle - React, Tailwind, and code Playground
by Evan Sharp
HTML
<div id="a"></div>
CSS
#a {
height: 20px;
width: 20px;
background-color: green;
position: absolute;
left: 40px;
}
JavaScript
$.easing.easingName = function(t, millisecondsSince, startValue, endValue, totalDuration) {
if (t < 0.3) {
return t * 4;
} else if (t < 0.6) {
return -2 * t + 1.8;
} else {
return t;
}
};
$('#a').animate({
left: '130px',
width: '40px',
height: '40px'
}, 2000, 'easingName');