About 434,000 results
Open links in new tab
    Upvotes63edited Mar 1, 2016 at 16:28

    If you're using version 3.x of Bootstrap, the correct way to do this now is:

    $('#myModal').on('hidden.bs.modal', function (e) {
    // do something...
    })

    Scroll down to the events section to learn more.

    http://getbootstrap.com/javascript/#modals-usage

    This appears to remain unchanged for whenever version 4 releases (http://v4-alpha.getbootstrap.com/components/modal/#events), but if it does I'll be sure to update this post with the relevant information.

    Content Under CC-BY-SA license
    Was this helpful?
  1. Capture close event on Bootstrap Modal - Stack Overflow

    Nov 6, 2019 · catch close event in bootstrap 5, without jquery: var myModalEl = document.getElementById('myModal') …

    • Reviews: 2
    • How to Bind a Function to Bootstrap Modal Close Event

      Nov 29, 2018 · If you want to perform some functionality when the user closes the modal popup, you need to bind the respective function or code to Bootstrap …

      • Estimated Reading Time: 1 min
      • jQuery Modal

      • Modal - Bootstrap

        Use Bootstrap’s JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.

      • How to Close a Bootstrap Modal Window Using jQuery - Tutorial …

      • Dialog Widget | jQuery UI API Documentation

      • W3Schools Tryit Editor

      • Modal · Bootstrap v4.6

      • jquery-ui-dialog - How to hook into dialog close event

      • Some results have been removed