0
I intend to use two popup ads on my site, as I do to open one at a time when refreshing the page I tried, but it opens two pop-ups at the same time irritating any visitor, I tried the following script.
(function () {
var isOpened = false;
var siteUrl = "http://popup1";
var siteUrl = "http://popup2";
document.addEventListener("click", function(){
if (!isOpened) {
isOpened = !!window.open(siteUrl, "_blank");
}
});
})();
@Márcioeric, just make comments that try to solve the problem.
– RFL