[ad_1]
i have my age verification pop up i want to appear only once when the site is visited and the pop up keeps appearing each item i refresh my browser, how do i go about it? answer will be much appreciated.
if (document.getElementById("newsletter-popup-form")) {
setTimeout(function () {
var mpInstance = $.magnificPopup.instance;
if (mpInstance.isOpen) {
mpInstance.close();
}
setTimeout(function () {
$.magnificPopup.open({
items: {
src: "#newsletter-popup-form",
},
type: "inline",
removalDelay: 350,
callbacks: {
open: function () {
$("body").css("overflow-x", "visible");
$(".sticky-header.fixed").css("padding-right", "1.7rem");
},
close: function () {
$("body").css("overflow-x", "hidden");
$(".sticky-header.fixed").css("padding-right", "0");
},
},
});
}, 500);
}, 100);
}
[ad_2]