Popup opening on every page after Load is finished, even after it is closed

Asked

Viewed 33 times

-2

I have a following situation: A Popup appears every time you finish a load on the page, the user can click X (close). But every time he enters another page the Popup goes up again and so it is annoying for the user to have to keep closing always. Someone can help me with a solution. Help

$(window).load("document", function(){
  setTimeout(() => {
      $("#whats-help").slideDown()
  }, 2000)
})  // Inicia sempre após a página terminar de carregar.


$("#whats-close").click(function(){
  $("#whats-help").slideToggle(500);
})
  • You have to make a localStorage

  • Have any idea how I do with Jquery bro, at close click?

  • I already gave the tip up there man, now just you research

1 answer

0

$(document).ready(function() {
  var isshow = localStorage.getItem('isshow');
  if (isshow== null) {
    localStorage.setItem('isshow', 1);

    // Show popup here
    $('#jPopup').show();
  }
});

Browser other questions tagged

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