Show a div depending on a cookie set or unset. Reset cookie every 24 hours.


To make a DIV shown only first time someone visits page, and then when he/she revisit it, that same DIV will be hidden for next 24 hours… so in that way DIV would be shown only once a day, and only on first page load.

Here is where you get the functions for handling cookies:

Solution 1 (seen at:

Now, the div to be shown should have a class name set to hide by default.

With the above cookie handling functions, you can use them like this:
Place the following script just before the tag.