JSFiddle - React, Tailwind, and code Playground

by Kriem

HTML

<script src='https://raw.github.com/rstacruz/jquery.transit/master/jquery.transit.js'></script>

<div></div>

CSS

div
{
    width:50px;
    height:50px;
    border-radius:20%;
    background:#0ae;
}

JavaScript

$(function() { 
    
    
    function first(){
        
        $('div').transition({
        
            x:'50px' ,
            y:'100px',
            opacity:.5,
            scale:2,
            rotate:-20
        
        }, 1000, 'in', second);
    }
    
    function second(){
        
        $('div').transition({
        
            x:'200px' ,
            y:'200px',
            opacity:1,
            scale:5,
            rotate:10
        
        }, 1000, 'out', first);
    }
    
    
   first();

});