Despite browsing through numerous similar questions, none of the solutions seem to work for my issue.
Listed below are some points I have checked:
- Jquery is loaded before bootstrap
- Bootstrap libraries are up to date
- Confirmation that bootstrap.min.js is loading correctly, even after switching to a CDN delivery to avoid version mismatch or any other potential issues.
Here is the code snippet in question:
<html>
<head>
<meta charset = "utf-8">
<meta name = "viewport" content = "width=device-width, initial-scale=1">
<title>HOME</title>
<script type = "text/javascript" src = "jquery-3.6.0.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3e5c51514a4d4a4c5f4e7e0b100e100c">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="03616c6c77707771627343362d332d31">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<link rel = "stylesheet" href = "customstyle/research_styles.css">
<link rel = "stylesheet" href = "customstyle/navbar.css">
</head>
<body>
<nav class = "navbar navbar-expand-lg navbar-dark bg-black">
<a class = "navbar-brand" class = "typewriter_welcome" href = "#"><p class = "typewriter_welcome">Wang Lab</p></a>
<button class = "navbar-toggler" type = "button" data-toggle = "collapse" data-target = "#navbarTogglerDemo02" aria-controls = "navbarTogglerDemo02" aria-expanded = "false" aria-label = "Toggle Navigation">
<span class = "navbar-toggler-icon"></span>
</button>
<div class = "collaspse navbar-collapse" id = "navbarNav">
<ul class = "navbar-nav mr-auto mt-2 mt-lg-0">
<li class = "nav-item active">
<a class = "nav-link" href = "index.html">Home<span class = "sr-only"></span></a>
</li>
<li class = "nav-item">
<a class = "nav-link" href = "research.html">Research (Current)</a>
</li>
<li class = "nav-item">
<a class = "nav-link" href = "#">Publications</a>
</li>
<li class = "nav-item">
<a class = "nav-link" href = "#">Patents</a>
</li>
<li class = "nav-item">
<a class = "nav-link" href = "#">News</a>
</li>
<li class = "nav-item">
<a class = "nav-link" href = "#">Photos</a>
</li>
<li class = "nav-item">
<a class = "nav-link" href = "#">Collaborations</a>
</li>
<li class = "nav-item">
<a class = "nav-link" href = "#">People</a>
</li>
<li class = "nav-item">
<a class = "nav-link" href = "#">Contact</a>
</li>
</ul>
</div>
</nav>
<div class = "fold"></div>
<div id="slides" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100" src="images/molecule.jpeg" alt="First slide">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="images/parkinsons.jpeg" alt="Second slide">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="images/MRI.jpeg" alt="Third slide">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<script type = "text/javascript"> $('.carousel').carousel({interval: 2000});</script>
</body>
</html>
If you have any insights or suggestions, please share!