views:

27

answers:

2

I am Using Colorbox as a Pop Up with a Chat Button that appears.

How Can I make it so it only Pops up on the users 1st visit to the page? Or Maybe it Pops up every 3 Visits?

Here is the Page I am Testing with: http://www.702wedding.com/weddings-in-las-vegas-pop.asp

Thanks Very Much Community of Wise People.

A: 

You need to remember the fact that there was a previous visit. Use a cookie.

Jerome
How can I implement a Cookie Counter though?
James
+1  A: 

Use a cookie. This guide should provide you with the information you need on how to store and retrieve cookies.

So you could check if the cookie exists, and if it doesn't, pop up whatever you need. You can store a number in the cookie to tell how many visits have occurred. Then use the % operator to check for every 3rd visit (e.g. if (visits % 3 == 0) { alert('hi'); }.

Valera
You Rock Thanks.
James