I have a page where one Bootstrap modal opens another modal.
The problem is that with each opened modal, it adds
<div class="modal-backdrop fade in"></div>
to the HTML code. It's fine for the first one, but since it's opacity: .5;
it then makes the page darker on every modal opened. Is there a way to check if a modal-backdrop
already exists and in that case not open another one?
I open my modals with either
<a href="" data-target="#modal_01" data-toggle="modal">Modal</a>
or with jQuery:
$('#modal_01').modal('show');
Any help to this problem is greatly appreciated!
Here's a fiddle for your convenience: https://jsfiddle.net/zsk4econ/1/