Dropdown Example
The show.bs.dropdown event occurs when the dropdown is about to be shown.
The shown.bs.dropdown event occurs when the dropdown is fully shown.
The hide.bs.dropdown event occurs when the dropdown is about to be hidden.
The hidden.bs.dropdown event occurs when the dropdown is fully hidden.
Note: For dropdowns, you should always include the data-toggle="dropdown" attribute. Do not rely solely on the toggle method, as it may not work as expected in all browsers.