Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8499271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:37:16+00:00 2026-06-11T00:37:16+00:00

In Twitter bootstrap, looking at the modals documentation. I wasn’t able to figure out

  • 0

In Twitter bootstrap, looking at the modals documentation. I wasn’t able to figure out if there is a way to listen to the close event of the modal and execute a function.

e.g. lets take this modal as an example:

<div class="modal-header">
    <button type="button" class="close close_link" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h3>Modal header</h3>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
    <a href="#" class="btn close_link" data-dismiss="modal">Close</a>   
</div>

The X button on top and the close button on bottom can both hide/close the modal because of data-dismiss="modal". So I wonder, if I could somehow listen to that?

Alternatively I could do it manually like this, I guess…

$("#salesitems_modal").load(url, data, function() { 
     $(this).modal('show'); 
     $(this).find(".close_link").click(modal_closing);
});

What do you think?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:37:18+00:00Added an answer on June 11, 2026 at 12:37 am

    Updated for Bootstrap 3 and 4

    Bootstrap 3 and Bootstrap 4 docs refer two events you can use.

    hide.bs.modal: This event is fired immediately when the hide instance method has been called.
    hidden.bs.modal: This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete).

    And provide an example on how to use them:

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

    Legacy Bootstrap 2.3.2 answer

    Bootstrap’s documentation refers two events you can use.

    hide: This event is fired immediately when the hide instance method has been called.
    hidden: This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete).

    And provides an example on how to use them:

    $('#myModal').on('hidden', function () {
        // do something…
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In twitter bootstrap, I was looking for a way to allow a button to
I was looking to using the Twitter Bootstrap Modal windows as a partial view.
I just started using Twitter Bootstrap http://twitter.github.com/bootstrap/scaffolding.html and I'm looking for the grey/blue navbar
I was looking at the jQuery plugins for Twitter Bootstrap and saw that they
I've been looking at twitter bootstrap and came across some syntax and I do
I've been looking at Twitter's Bootstrap framework and I'm really impressed. However, I don't
I was looking into the following two bootstrap plugins for compass: https://github.com/vwall/compass-twitter-bootstrap https://github.com/hecbuma/compass-bootstrap Is
Community, I recently stumbled upon Twitter Bootstrap while looking for possibilities to design a
I have a HTML Div (I'm using Twitter Bootstrap to hide-show div2 ) looking
I am using twitter bootstrap and looking for a drop down that will look

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.