JSFiddle - React, Tailwind, and code Playground

by austegard

HTML

<button>Blah</button>

CSS

button {position: absolute}

JavaScript

$("button").click(function(){
    $(this).animate({left: "+=100px"})
        .delay(1000)
        .animate({top: "+=100px"})
        .delay(1000)
        .animate({left: "-=100px"})
        .delay(1000)
        .animate({top: "-=100px"});
    
});