Feature Request: Add support for closing dropdowns through the JavaScript API
There is one JS method for dropdowns:
$().dropdown('toggle') // Toggles the dropdown menu of a given navbar or tabbed navigation.
docs: https://v4-alpha.getbootstrap.com/components/dropdowns/#methods
Though the alert component is not exactly a parallel, I think this would provide some consistency to the API, which provides a way to close alerts:
$().alert('close') // Closes an alert by removing it from the DOM. If the .fade and .show classes are present on the element, the alert will fade out before it is removed.
docs: https://v4-alpha.getbootstrap.com/components/alerts/#methods
Further, modals provide a similar close ('hide') feature.
docs: http://v4-alpha.getbootstrap.com/components/modal/#methods
IMHO it would be good to have explicit open & close methods in addition to toggle.
100% agree with the above, having open/close in addition to "toggle" (which should toggle instead of just open). I spent 30 minutes debugging what i thought was my bad code only to find out that "toggle" doesn't really mean "toggle" in this case.
Most helpful comment
IMHO it would be good to have explicit
open&closemethods in addition totoggle.