One interesting feature of bootstrap is that it allows users to disable links within its dropdown menu component by simply adding a class="disabled"
into the corresponding <li>
tag.
I am looking to create some Javascript code so that when a user selects the dropdown menu and clicks on a link within it, that link will become disabled. The dropdown menu naturally closes immediately when a valid link is selected, or when the user clicks outside of the dropdown box. Therefore, upon reopening the menu on any subsequent visit, all previously selected items should appear as disabled.
I have attempted to use the solutions provided in this link: disable a hyperlink using jQuery, but unfortunately, none of them are working for me.