Here’s the issue with my carousel:
The carousel indicators are functioning properly,
but the "next" and "prev" buttons are not responding.
The scripts I have included are:
- popperjs,
- bootstrap-5.2.0
- jquery-3.6.0.
The links in my HTML element are in the <head>
.
and the scripts are in the body.
<div id="mycarousel" class="carousel slide" data-bs-ride="true">
<div class="carousel-indicators">
<button data-bs-target="#mycarousel" data-bs-slide-to="0" class="active" aria-current="true"
aria-label="Slide 1"></button>
<button data-bs-target="#mycarousel" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button data-bs-target="#mycarousel" data-bs-slide-to="2" aria-label="Slide 3"></button>
<button data-bs-target="#mycarousel" data-bs-slide-to="3" aria-label="Slide 4"></button>
</div>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="images/ecg.jpg" class="d-block w-100" alt="">
</div>
<div class="carousel-item">
<img src="images/tech.jpg" class="d-block w-100" alt="">
</div>
<div class="carousel-item">
<img src="images/tecnical.jpg" class="d-block w-100" alt="">
</div>
<div class="carousel-item">
<img src="images/ultrason.jpg" class="d-block w-100" alt="">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="mycarousel" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visially-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="mycarousel" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visially-hidden">Next</span>
</button>
</div>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a0c3cfd2c5e0928e91918e95">[email protected]</a>/dist/umd/popper.min.js"
integrity="sha384-Xe+8cL9oJa6tN/veChSP7q+mnSPaj5Bcu9mPX5F5xIGE0DVittaqT5lorf0EI7Vk"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="593b36362d2a2d2b3829196c776b7769">[email protected]</a>/dist/js/bootstrap.min.js"
integrity="sha384-ODmDIVzN+pFdexxHEHFBQH3/9/vQ9uori45z4JjnFsRydbmQbmL5t1tQ0culUzyK"
crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>