Jobin Jobin - 1 year ago 102
jQuery Question

How to handle the close event of Bootstrap popup

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('', function () {
// do something…

It will only fire after the close event.

Answer Source

Use the event..

$('#myModal').on('', function (e) {
    //do something..


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download