JSFiddle - React, Tailwind, and code Playground
JavaScript
var src = "http://jpct.de/jpctnet/pics/egonolsen.jpg";
function go(thing) {
var $thing = $(thing);
$thing.animate(
{
opacity: ($thing.css("opacity")==1)?0:1
},
5000 * Math.random()+500,
function() {
go(thing);
}
);
}
console.log($("body"));
for (var i=0; i<25; ++i) {
$img = $("<img>");
$img.attr("src", src);
$("body").append($img);
go($img);
}