Can anyone please tell me how to check bootstrap 3.0 modal status, is it open or closed using jQuery or javascript. I used following code but it works when you have opened a mod
I used the following code for my AJAX Call. After a setTimeout i tried to close the model properly and used the is() method for doing so. Hope it helps somebody.
complete: function(){
setTimeout(function() {
// model
if($('#mdlNewOrder').is(':visible')) {
$('#mdlNewOrder').modal('toggle');
}
//buttons
$('#btn_closeNewOrder').prop("disabled", false);
$('#btn_NewOrder').prop("disabled", false);
// table reload
$('#table_patientlist').DataTable().ajax.reload(null, false);
}, 2800);
}