I'm experiencing an issue with a bootstrap dropdown that I created. I am unable to select an item from it. The code is shown below:
var aos = '';
$('.dropdown-item').click(function(event) {
event.preventDefault(); // Prevents scrolling to top of page
aos = $(this).text(); // Get the text value of the thing that was clicked
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Project Role
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<li><a class="dropdown-item" href="#">PO</a></li>
<li><a class="dropdown-item" href="#">SM</a></li>
<li><a class="dropdown-item" href="#">AC</a></li>
<li><a class="dropdown-item" href="#">Team Member</a></li>
</div>
</div>