I have slider with right left click button and its sliding fine but not smooth sliding and I would like to auto slide my banner images with 4-5 sec duration, I have not found any tutorial how to make it auto slide, please check my script and css.
<script>
var slideIndex = 1;
showSlides(slideIndex);
function plusSlides(n) {
showSlides(slideIndex += n);
}
function currentSlide(n) {
showSlides(slideIndex = n);
}
function showSlides(n) {
var i;
var slides = document.getElementsByClassName("mySlides");
var dots = document.getElementsByClassName("dot");
if (n > slides.length) {slideIndex = 1}
if (n < 1) {slideIndex = slides.length}
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" active", "");
}
slides[slideIndex-1].style.display = "block";
dots[slideIndex-1].className += " active";
}
</script>
<div class="slideshow-container">
<div class="thrive-banner-dots">
<span class="dot" onclick="currentSlide(1)"></span>
<span class="dot" onclick="currentSlide(2)"></span>
<span class="dot" onclick="currentSlide(3)"></span>
</div>
<div class="mySlides">
<div class="text-animate-slider">
<p>With a strong network of more than 800 colleges and 38,000 institutes, India is the second-largest education hub. The current education system is a blend of theoretical and experimental learning that enables education at par with the global standards.
</div>
</div>
<div class="mySlides">
<div class="text-animate-slider">
<p>India is a land of many discoveries and innovations. The competitive learning environment encourages students to think out-of-the-box and thrive in the academic journey.</p>
</div>
</div>
<div class="mySlides">
<div class="text-animate-slider">
<p>The rich heritage of India is an amalgamation of diverse cultures and religions. So, in addition to attaining inclusive education, there is so much to explore, from multiple cuisines, distinct and joyful festivals to many forms of music, art and dance.
</div>
</div>
<a class="prev-animate-slider" onclick="plusSlides(-1)">❮</a>
<a class="next-animate-slider" onclick="plusSlides(1)">❯</a>
</div>