JSFiddle - React, Tailwind, and code Playground

by Paulpro

HTML

<div id="elem1"></div>
<div id="elem2"></div>

CSS

div {
    position: absolute;   
    width: 100px;
    height: 100px;
}

#elem1 {
    background-color: #66F;
}

#elem2 {
    left: 100px;
    background-color: #6F6;
}

JavaScript

var a=$("#elem1");
var b=$("#elem2");
var c = a.add(b);

// Animate both:
c.animate({'top': '400px'}, 5000);