Check out the JSFiddle for this code snippet.
I'm attempting to implement Bootstrap's drop-down menu using list items instead of options. When a list item is selected, the data should be retrieved and displayed as an active selection within a button element by adding the class 'active-select'. Here is an example:
<li><a href="#" class="active-select">New York<a><li>
The issue I'm encountering is that when clicking on other list items, the 'active-select' class is removed not only from the corresponding button but also from list items in other button drop-down groups. It looks like this:
<li><a href="#" class>New York<a><li>
If anyone has a solution or can offer some assistance, it would be greatly appreciated!