Como verificar com o jQuery se o modal de bootstrap está oculto ou mostrado
$('#myModal').on('shown.bs.modal', function () {
// will only come inside after the modal is shown
});
AKASH SIDDAMSHETTY