Pop up modal window once

Asked

Viewed 213 times

0

I’m having a hard time making the modal window look just once.

In the JS

test("modal shows up", function() {
  equal($('.sweet-alert').length, 0);

  swal({
  title: "Amigo da FAST FUSO<br>ATENÇÃO!",
  text: "Estamos sofrendo com um grande problema de comunicação.<br>Estamos com problemas em nosso tronco-chave da VIVO, dificultando muito a comunicação com vocês. <br>(SEM PREVISÃO DE CONCERTO POR PARTE DA VIVO)<br> Durante este processo informamos telefones que estão funcionando enquanto não regularizamos a situação de nosso troco-chave.<br> TELEFONES DE CONTATO:<br>(11) 3409-3675<br> (11) 2884-8410 <br>(11) 3409-2805<br>(11) 3405-0932 <br>(11) 3405-0542<br> e-mail de contato: [email protected]<br> Agradecemos a ajuda e compreensão de todos.", 
  html: true
});

  ok($('.sweet-alert').is(':visible'));

});

In the CSS

body.stop-scrolling {   height: 100%;   overflow: hidden; }

.sweet-overlay {   background-color: black;   /* IE8 */   -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";   /* IE8 */   background-color: rgba(0, 0, 0, 0.4);   position: fixed;   left: 0;   right: 0;   top: 0;   bottom: 0;   display: none;   z-index: 10000; }

.sweet-alert {   background-color: white;   font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;   width: 800px;   padding: 17px;   border-radius: 5px;   text-align: center;   position: fixed;   left: 50%;   top: 50%;   margin-left: -400px;   margin-top:
-200px;   overflow: hidden;   display: none;   z-index: 99999; }
  • Can you edit the question and be clearer with the problem, please? It the modal appears more than once?

  • the modal open only 1 time , even after reloading page again

  • Why not try to use cookies. Once I was with the same purpose as yours, and I was suggested to use cookies. However, in my case, my system already used php. Yours uses?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.