JS Slideshow is a simple and lightweight Slideshow that uses vanilla Javascript.
Here is an example of JS Slideshow:
View this project on GitHub.
<!-- Make sure you include a reference to the JS Slideshow classes. -->
<script src="https://hambone-the-great.github.io/JS_Slideshow/Slideshow.js"></script>
<!-- A simple div with your desired id is the container for the slideshow. -->
<div id="mySlideshow" class="slideshow">
<!-- Each child node inside of the slideshow div is a "Slide" of the slideshow. -->
<div class="slide" style="background-image: url('https://upload.wikimedia.org/wikipedia/commons/c/cd/Jake-garn_29855392470_o.jpg');">
<span class="whiteTxt txtShadow">Lightweight, vanilla Javascript; no need for 3rd party libraries.</span>
</div>
<div class="slide middle" style="background-image: url('https://media.tenor.com/YGWwTOTIO4EAAAAC/friends.gif');">
<span class="whiteTxt txtShadow">Animated Gifs!</span>
</div>
<div class="slide top" style="background-image: url('https://upload.wikimedia.org/wikipedia/commons/1/14/Spacewalker.jpg')">
<span class="whiteTxt txtShadow">Slides can include text, images, video, and embedded resources.</span>
</div>
<div class="slide bottom" style="background-image: url('https://upload.wikimedia.org/wikipedia/commons/8/80/%22Pink%22_Full_Moon_and_Partial_Lunar_Eclipse_on_April_25%2C_2013_%288680887537%29.jpg');">
<span class="whiteTxt txtShadow">Text and images can be animated too!</span>
</div>
<div class="slide middle">
<span class="whiteTxt txtShadow">Embeded Resoureces!</span>
<iframe width="560" height="500" src="https://www.youtube.com/embed/GFgJgGV4d28" title="YouTube video player" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
<div class="slide top">
<img src="https://upload.wikimedia.org/wikipedia/commons/1/1c/A_Close_Look_At_Pluto_%2824965827610%29.jpg" />
</div>
</div>
<script>
//Initiate the Slideshow.
let slideshow = new Slideshow("mySlideshow");
slideshow.BackgroundColor = "#333";
slideshow.ShowControls = true;
slideshow.AnimationType = "Loop";
//start the slideshow.
slideshow.Start();
</script>
Copyright (c) 2023 Marcus Schuff (aka Hambone The Great) dba Schuff Software Company
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.