1
I was searching for a way to limit the appearance of a modal on my site, for example when clicking on a link asks for the e-mail registration before going to the anchor, but I do not want this to appear always, but once a session! I found something about Séssion Storage, can I do it for him? I do not understand much of javascript, sorry my ignorance!
Personal thank you.
Code of my modal.
<!-- Modal -->
<div class="modal fade" id="myModal3" role="dialog">
<div class="modal-dialog modal-sm">
<div class="modal fade" id="myModal3" role="dialog">
<div class="modal-dialog modal-sm">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Meu site.</h4>
</div>
<div class="modal-body">
<p>Deseja receber mais informações por e-mail?</p>
<form name="email" action="enviaEmail.php" method="POST" enctype="multipart/form-data">
<div class="form-group">
<input type="email" class="form-control" id="email" name="enterEmail" placeholder="Enter email" required>
</div>
<!--Oculto para mandar o produto clicado-->
<input type="hidden" class="form-control" name="cliqueSistema" id="cliqueSistema">
<button type="submit" class="btn btn-default" onclick="Alerta1()">Enviar</button>
</form>
</div>
<div class="modal-footer">
</div>
</div>
</div>
Yes you can. You would record in the session that the modal has already been displayed. And every time the page is loaded you check in the session whether to open the modal or not. If the site is in the air or has a code snippet that mounts your modal. Put it to help.
– Thiagosilr
I put the code I’m using from Modal.
– annyk