JSFiddle - React, Tailwind, and code Playground
by Ryumaru
HTML
<div id="slideshow">
<div class="slideshow-element">Test 1</div>
<div class="slideshow-element">Test 2</div>
<div class="slideshow-element">Test 3</div>
<div class="slideshow-element">Test 4</div>
</div>
CSS
.slideshow-element{
position: absolute;
}
JavaScript
jQuery(document).ready(function(){
$(function(){
$('#slideshow h4:gt(0)').hide();
setInterval(function(){
$('#slideshow :first-child').fadeOut(2000)
.next('div').fadeIn(2000)
.end().appendTo('#slideshow');},
2000);
});
});