I encountered an issue when updating from Bootstrap 4.5.3 to version 5.0.0 using the CDN bundle. Previously, with Bootstrap 4.5.3 loaded via the CDN bundle, a dropdown feature was working perfectly:
<!-- Nav Item - Pages Collapse Menu -->
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo"
aria-expanded="true" aria-controls="collapseTwo">
<span>AAAA</span>
</a>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">BBBB</h6>
<a class="collapse-item" href="CCCC.html">CCCC</a>
<a class="collapse-item" href="DDDD.html">DDDD</a>
</div>
</div>
</li>
However, after upgrading to Bootstrap 5.0.0 through the CDN bundle:
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="dcbeb3b3a8afa8aebdac9ce9f2ecf2ecf1beb9a8bded">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
The dropdown feature became unresponsive. I'm puzzled about why this change led to the malfunctioning of the dropdown. Any insights or tools for troubleshooting would be greatly appreciated.
For reference, my project originally used Bootstrap 4.5.3 as shown by this line in index.html:
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
The transition to Bootstrap 4.5.3 via the CDN bundle was seamless and everything continued to function properly. However, changing that last script line to upgrade to Bootstrap 5.0.0 introduced issues within the dropdown functionality.
If anyone can shed light on how to successfully migrate this code to Bootstrap 5.0.0 and whether JQuery is necessary for the process, it would be of immense help.