Answer the question
In order to leave comments, you need to log in
Why does "modal" close immediately after opening? DLE. Bootstrap
Faced a problem, when a modal window is called, it immediately closes and the page is updated.
Here is the window source:
<center><footer><div class="modal fade" id="foo" tabindex="1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
<button class="btn btn-success" data-toggle="modal" data-target="#foo">
Launch demo modal
</button>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question