JSFiddle - React, Tailwind, and code Playground

by Andrew Maestro

HTML

<div></div>

CSS

img {
    display: none;
}

JavaScript

var imgArray = ["http://img2.vetton.ru//upl/1000/346/138/vetton_ru_sddu7-2560x1600.jpg", "http://img2.vetton.ru//upl/1000/346/138/vetton_ru_mixwall66-2560x1600.jpg"];
var i=0;
setInterval(function(){
    $('<img src="'+imgArray[i]+'"/>').load(function(){
        $(this).fadeOut();
        $('div').html('').append(this);
    }).fadeIn(100);
    i++;
    if(imgArray.length==i-1){
        i=0;
    }     
},1000);