twitter/bootstrap — Issue #489: $(".modal").modal("hide") not working
Author: jonswaino
Created: 2011-10-26 15:16:02+00:00
State: open

My modal div's have .modal class. I have a standard close button bottom right of the dialog as well as the 'X' button. However, I removed the .close class from the button as the font was too large (presumably for the big 'X').

Instead I added the '.closeBtn' class to the close buttons, then wire up the .click handler using Jquery to explicitly call hide on the modals.

This doesn't work. Any ideas what is going on??

JavaScript:

$(".closeModal").click(function () {
$(".modal").modal("hide");
});

In the modal div:

×

Member Details

...

Close