I have a minor issue that has been keeping me up at night. I can't seem to shake it off and find the right solution!
Currently, I am working with Bootstrap 4 as my Framework. My task is to create a full-page Carousel that cycles through images randomly each time the page is refreshed, without any user interaction. The images need to be fetched from a specific folder due to the large quantity of images available.
Is there anyone willing to assist me with the necessary JavaScript code to achieve this?
Below is a basic piece of code that serves as my starting point. While it works perfectly fine in its current form, the issue arises from the fact that it always displays the same images in the specified order.
Thank you in advance for your help.
<html lang="it">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="beddd0d0dbdcdbe9deddc9b6bcd6dec3">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Stencil+Text&family=Big+Shoulders+Text&family=Goldman&family=Heebo&family=Quicksand&family=Shadows+Into+Light&display=swap" rel="stylesheet">
<style media="screen">
.carousel-inner > .carousel-item {
min-height: 800px;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
</style>
<title></title>
</head>
<body>
<section class="nopadding">
<div id="carouselProjRec" class="carousel slide carousel-fade" data-ride="carousel" interval="1800">
<div class="carousel-inner">
<div class="carousel-item transparent" style="background-image: url(img/car4.jpg)">
</div>
<div class="carousel-item active transparent" style="background-image: url(img/car3.jpg)">
</div>
<div class="carousel-item transparent" style="background-image: url(img/car8.jpg)">
</div>
<div class="carousel-item transparent" style="background-image: url(img/car7.jpg)">
</div>
<div class="carousel-item transparent" style="background-image: url(img/car6.jpg)">
</div>
<div class="carousel-item transparent" style="background-image: url(img/car11.jpg)">
</div>
</div>
</div>
</section>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a8cac7c7dcdbdcdac9d8e89c869d869b">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d9a9b6a9a9bcabf7b3aa99e8f7e8eff7e9">[email protected]</a>/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>