Bootstrap modal hide is not working. Alert comes in else. but my modal is not hidden Added bootply. My issue is the same one.
Before you open a loading modal, make sure that you close all others. This is the function is use to close the modal:
function hideLoadingModal() {
$('#loadingModal').on('shown.bs.modal', function () {
$('#loadingModal').modal('hide');
});
}
Now if I want to open the modal I call the above function and open a new one after that. Like this:
hideLoadingModal();
$('#loadingModal').modal('show');
Hope this helps you.
Cheers