+ 1
Slideshow
how to write a slideshow step by step???
3 Answers
+ 1
Using jQuery
1. Put images inside a div with a class .slider
<div class = "slider">....</div>
2. Give the images a class .image-items
<img src = "..." class = "image-items"
...in JavaScript
jQuery(document).ready(function(){
$(".slider .image-item:gt(0)").hide();
setInterval(function(){
$(".slider > .image-item:first")
.fadeOut(1000)
.next()
.fadeIn(1000)
.end()
.appendTo(".slider");
}, 10000);
1,000 means the images fade in and out in 1s
10,000 means that the image will change after 10s
0
That seems easy
let me try
thanks
0
Reference for making slideshow:
https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_slideshow_self