Jquery slideshows / transitions for HTML content

A search for rotators based on jQuery finds only the original rotator plugin and a bunch of photo galleries, which I don’t want. Please suggest other rotators. A rotator should be able to rotate HTML not only images (for example, the Glimmer tool, which can create jQuery / HTML code for rotating images).

+3
source share
5 answers

Why use plugins? use this single insert (I just split it into 3 lines for readability)

see demo

Your HTML should be something like this

HTML

<div class="yourContainer">
 <div>some html</div>
 <div>other html</div>
</div>

Js / jquery

$(function(){
    $('.yourContainer div:gt(0)').hide();
    setInterval(function(){$('.yourContainer :first-child').fadeOut().next().fadeIn().end().appendTo('.yourContainer');}, 3000);
});

CSS (option = makes the transition smoother)

.yourContainer{ position:relative;}
.yourContainer div{ position:absolute; hight:300px; width:300px; background:red; }
+5
source
+1

. , Javascript.

+1

jQuery Slider. , . - , , .

0

SlidesJS. Zurb .

0

Source: https://habr.com/ru/post/1757565/


All Articles