How to set a delay on a pop-up with a cookie using Jquery

Hi Guys,

I was working with @vincent his custom cookie pop-up. It is to set a cookie using Jquery, and use it to show a pop-up message or not.

Project is available here: Webflow - Cookie Template

The thing I’m trying to add is a delay on that pop-up, so the pop-up will show up after 10 seconds.

This is the code I managed to make, but for some reason it is not working.

	if (!Cookies.get('alert')) {
    }, 10000);  }
 	  Cookies.set('alert', true, { expires: 1 });

Thanks in advance!

setTimeout function your are using should be working. But you do have a 10 seconds long delay.

Why don’t you try using another option instead of setTimeout().

You can do something like, replace whole setTimeout function:


Also it is be best to check your project and see you’ve done it, there can be any other issues sometimes.