I am creating a website using bootstrap 5, I would like to have a button that when the user clicks it that a popover appears.
I have added jQuery and the popper.js files to my files. However when I click on the button nothing happens. I have checked the console and it doesn't seem to show any errors. I have no idea what is wrong.
Here is my button code.
<button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus
sagittis lacus vel augue laoreet rutrum faucibus."><i class="fas fa-shopping-cart" style="color: #fff;">
Cart </i>
</button>
Here is my jQuery code
$(document).ready(() => {
$('[data-toggle="popover"]').popover();
});
Here are the jQuery and popper.js files I have linked.
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
I am wonder if I have linked the wrong version of the files as the bootstrap website wasn't very helpful when it came to this.