I want to simply do some logic after my modal has been dismissed.
In the modal I have a button:
<button type="button" class="btn btn-primary" onclick="$('#mymodal').modal('hide');">Save changes</button>
In the view I'm waiting for the event being fired, but it never does.
$('#mymodal').on('hide.bs.modal', function (e) {
alert('event fired')
});
I tried to put breakpoints in chrome dev tools, the event is only hit at the first load of the view. After that the breakpoint is never reached again. Am I doing something wrong?
By the way, the modal is hiding the way I want.
$('#mymodal').on('hide.bs.modal', ...)
? – Aluminothermy$(function() { $('#mymodal').on('hide.bs.modal', ...) })
. – Aluminothermy