Cómo consultar con jQuery si el modal de bootstrap está oculto o se muestra
$('#myModal').on('shown.bs.modal', function () {
// will only come inside after the modal is shown
});
AKASH SIDDAMSHETTY