Skip to content

Feature Request: Close dropdown with JavaScript $().dropdown('close') #22835

@sealocal

Description

@sealocal

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions