In my mvc application I have used one bootstrap popup, I need to check whether any changes are made in textboxes in this popup before closing this window, and give an option to save this before closing. How can I handle the close event of bootstrap popup window? I have tried
$('#myModal').on('hidden.bs.modal', function () {
// do something…
})
It will only fire after the close event.