JSFiddle - React, Tailwind, and code Playground

by Takayuki Shimada

HTML

<div class="target"></div>

CSS

.target {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: blue;
}

JavaScript

$(function () {

$('.target')
    .animate({
        top: '+=100px'
    }, 500, 'swing')
    .promise().done(function () {
        // アニメーション完了後に実行される
        alert('done!');
    });

});