I’m trying to implement some javascript on my website that should display the popup the first time someone visits the site and create a cookie so the popup does not appear again for 24 hours.
But I can’t figure out why it’s not working. I’ve been trying to figure it out for days. Any help would be greatly appreciated! Unfortunately, there seem to be no replies on the original thread when others have experienced the same issue.
The code is located in the home page settings and should work for the class ‘popup-overlay’.
The underscore was in the code you copied and pasted from my demo page… the code shown on the page as an example. I really don’t know why I had an underscore there. If you had cloned the project and copied the code from the page settings, it would have worked because the code was correct there.
My fault, sorry, and probably the reason why others have trouble replicating this demo sometimes…
Oh, cloning and inspecting, sharing projects, is an essential part of learning Webflow. It’s easy. Go back to the post where i shared the template, there are two links. The second link is a link to the project page. From the project page, you can either directly open a read only version of it, or click on clone, which will place a copy of the project in your Webflow dashboard.
Hi @vincent I’m new on Webflow. I was looking for a solution with the PopUp I create, which is to not showing it after it is clicked. I tried to use your code but it didn’t work. Was it created specific for your popup or can it be used also in others popup, like mine? I used the same element name (popup-overlay), regarding the cookie alert, Do I need to have it somewhere on the element as well or just in the code? I already cloned your example, but I can’t find anything which gives me a clue. Any other tip?