Skip to content

Commit

Permalink
Solved news letter popup multiple times loading issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
ygowthamr committed Nov 6, 2024
1 parent 37141e1 commit 2425c41
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions public/script/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,15 @@ document.addEventListener('DOMContentLoaded', function() {
}
});

if (localStorage.getItem("noThanksClicked") === "true") {
document.getElementById('popup-nl').style.visibility = 'hidden';
}

// Handle "No thanks" link
document.querySelector('.no-thanks-nl').addEventListener('click', function(event) {
event.preventDefault();
document.getElementById('popup-nl').style.display = 'none';
event.preventDefault();
document.getElementById('popup-nl').style.display = 'none';
localStorage.setItem("noThanksClicked", "true");
});
feedback
});
Expand Down

0 comments on commit 2425c41

Please sign in to comment.