I have read the article “How to display a load popup only once per user / session?”
Link: How to display a load popup only once per user/session?
I tried the following code and it works
<script>
var Webflow = Webflow || [];
Webflow.push(function() {
// Load cookie library
$.getScript('https://cdn.rawgit.com/js-cookie/js-cookie/v2.1.2/src/js.cookie.js', function() {
// If cookie found (already shown)
if(Cookies.get('notice') !== undefined) {
// Hide cookie notice (change jQuery selector to match your own)
$('.modal-wrapper').remove();
}
// On button click
$('.modal-wrapper').click(function() {
// Calculate when you want to display the notice again (change 15 to number of minutes you want)
var expireTime = new Date(new Date().getTime() + 60000 * 60 * 24 * 60);
// Set this cookie
Cookies.set('notice', 'shown', { expires: expireTime });
});
});
});
</script>
I am having trouble wanting the popup to show again after 1 minute to the person, not after 24 hours like the code above. Looking forward to all the helpers!
Here is my site Read-Only: LINK
(how to share your site Read-Only link)