ehpc / bootstrap-waitingfor

"Waiting for..." modal dialog with progress bar for Bootstrap
MIT License
138 stars 82 forks source link

Add callback #1

Closed behzadev closed 9 years ago

behzadev commented 9 years ago

Hello,

Thanks for this script.

How we can add callback function to this? when I run waitingDialog.hide();, I want to alert('1'); after it's gone hidden.

Right now if you do: waitingDialog.hide(); alert('1');

You will get the alert while the modal is still there, I want to have the alert after the modal is completely hidden.

Thanks

behzadev commented 9 years ago

Figured this out by hidden.bs.modal. Thanks anyway.

behzadev commented 9 years ago

This has caused me a serious problem, any working solution around?

ehpc commented 9 years ago

Hello, behz4d!

I've added a callback for your use case in commit c042c510290e3fdcda5f306203d0b5e8257f1ee4. You can now show the dialog as following:

    waitingDialog.show('Message', {
        onHide: function () {
            alert('1');
        }
    });
accorinti commented 4 years ago

The callback is not working if using the size option: This works: waitingDialog.show('Message', { onHide: function () { alert('1'); } }); This doesn't: waitingDialog.show('Message', {dialogSize: 'sm'}, { onHide: function () { alert('1'); } });

:-/