Custom code works in Chrome but not Safari/Firefox

Hello,

I have a popup that should only appear on the homepage once every 24 hours. It seems to work fine in Chrome but in Safari and Firefox the popup appears every time the page is loaded.

I’m using the script from this site:
Webflow Cookie Template

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.1/js.cookie.min.js" ></script>

<script>
$(document).ready(function(){
	if (!Cookies.get('alert')) { 
	  $('.popup-overlay').show(); 
 	  Cookies.set('alert', true, { expires: 1 });
	}
});
// Documentation at https://github.com/js-cookie/js-cookie
</script>

Any ideas as to why this would only work in Chrome?

Thanks!


Here is my site Read-Only: [Webflow - Northern Drivers Charitable Trust]
The live site can be seen here: https://driverstrust.org.nz/

Hi @saintkevin , I am facing the same issue.
Did you found any solution for this ?

This project (the Webflow Cookie Template cloneable) mistakenly loads
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" ></script>
Which is not needed since every Webflow project has jQuery loaded already just above the custom code before body close area.

If your having problems make sure you don’t have this extra load of jQuery in your project. Then you can test and go from there.