JSFiddle - React, Tailwind, and code Playground
by Emmanuel Garcia
HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Simplest jQuery Slideshow Plugin</title>
<script>
document.documentElement.className += 'js';
</script>
</head>
</style>
</head>
<body>
<div class="fadein">
<img src="http://lorempixel.com/400/200/sports/1/" alt="" />
<img src="http://lorempixel.com/400/200/sports/5/" alt="" />
<img src="http://lorempixel.com/400/200/sports/9/" alt="" />
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
</body>
</html>
CSS
body { font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
.fadein { position: relative; }
.fadein img { position: absolute; left: 0; top: 0; width: 100%; height: auto; }
.js .fadein img { display: none; }
.js .fadein img:first-child { display: block; }
</style>
JavaScript
document.documentElement.className += 'js';
$(function() {
$('.fadein').children().eq(0).appendTo('.fadein').show();
setInterval(function() {
$('.fadein :first-child').hide().appendTo('.fadein').fadeIn(2000);
}, 4000);
});