JSFiddle - React, Tailwind, and code Playground
by Alexis LĂłpez Espinoza
HTML
<img id = "test1" />
CSS
#test1{
position: relative;
}
JavaScript
var img1 = "http://3.bp.blogspot.com/_mDCUlcb7a3s/S-G-trqRDmI/AAAAAAAAABY/wktQjhTLCJM/s1600/carolina.jpg",
img2 = "http://www.decoracion-de-interiores.net/wp-content/uploads/2011/07/africano.jpg",
tem = 1500;
$("#test1")
.prop("src", img1)
.animate(
{left: 400},
tem,
"linear",
function(){
$(this)
.prop("src", img2)
.animate({left: 384}, tem);
}
);