How to set a cookie to remember the popup is closed
-
Hi Folks,
On our page, we have two buttons;
produced by code:
<p><img src="https://mandoestage.wpengine.com/wp-content/uploads/2022/06/change-countries.svg" alt="change countries?" /></p> <h3>Are you visiting Mandoe from outside your region?</h3> <p>Visit your regional site for more relevant pricing, promotions and events.</p> <p id="geo-buttons"><a id="geo-target" class="geo-button" onclick="redirect()" style="color: black;">Visit AUS</a> <a id="geo-close" class="geo-button">Visit US</a></p> <script> function redirect(){ var loc = window.location; var pathname = loc.pathname; var AustralianSite = 'https://mandoestage.wpengine.com/en-au'; var finalURL = AustralianSite + pathname; window.location.href = finalURL; } jQuery( document ).ready(function() { jQuery("#geo-close").click(function() { jQuery(".spu-container").hide(); }); }); </script>
How do I add another function to
jQuery("#geo-close").click
to set a cookie to remember the popup has been closed, the same way clicking the cross @ top right does.Help appreciated.
SteveThe page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to set a cookie to remember the popup is closed’ is closed to new replies.