JSFiddle - React, Tailwind, and code Playground

by Avinash

HTML

<script src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/ui-lightness/jquery-ui.css">
<div id="top-message"></div>

CSS

#top-message {
    background: orange;
    position: relative;
    width: 100px;
    height: 100px;
    top: -500px;
}

JavaScript

$("#top-message").animate({top: '200px'}, 400, function () {
    $(this).delay(1000).animate({top: '0px'}, 800, function () {
        $(this).delay(3000).animate({top: '200px'}, 800);
    });
});