Show Jquery Popup Only Once

前端 未结 3 2028
一向
一向 2020-12-20 08:47

I have a site where a user must login and once that is done they are directed to a new page and a pop up box appears. I have no problem displaying the popup box however if y

3条回答
  •  南笙
    南笙 (楼主)
    2020-12-20 09:48

    you can use localstorage to do that:

    if (localStorage.getItem("iswrpdivloaded") === null) {
      $('#back-wrapper').fadeIn(1000,function(){
       $('#popup-image-back').fadeIn(1000);
    });
    localStorage.setItem('iswrpdivloaded', 1);
    }
    

提交回复
热议问题