Answer the question
In order to leave comments, you need to log in
How to automatically open modal window only once?
Hello! On my site, when visiting, a modal window automatically opens, to select the language there are two links there simply. How can I make this modal window open only once? Only on the first visit? Not every time the page is refreshed
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<a href="">
<button type="button" class="btn btn-primary">RU</button>
</a>
<a href="/en/">
<button type="button" class="btn btn-primary">EN</button>
</a>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
$(window).on('load',function(){
$('#myModal').modal('show');
});
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