/* JavaScript */
var slides=0;
var array=new Array('background.jpg','banner.jpg','image.jpg');
var length=array.length-1;
$(document).ready(
function(){
setInterval(function(){
slides++;
if (slides<0)
{
slides=length;
}
if (slides>length)
{
slides=0;
}
document.slide.src=array[slides];
},4000)
})
<!-- HTML -->
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
</head>
<body>
<img src="image.jpg" id="slidess" name="slide" width="200px" height="100px">
</body>
</html>
Hello there! Can someone assist me in adding CSS animation to this slideshow? Despite trying various options, I have been unable to make it work. I attempted to incorporate a start class for the animation and then replace it with an end class at the conclusion of the function, but unfortunately, it had no effect!