twitter/bootstrap — pull request #596 by scottkf (2011-11-09 21:01:47+00:00)
Title: Passing further info to the hide/hidden events to see which object triggered the event

I was in the situation of having a modal with an 'ok' and 'cancel' button and needed to figure out which caused the modal to close.

I needed the event info that was passed to the `Modal.hide()` function to be passed to the `hide` and `hidden` events as well. So now I can do this:

$('#modal-from-dom').bind('hidden', function(e, f) {
if ($.inArray("cancel",f.srcElement.classList) < 0) {
// some stuff
}
});