I will start with i don't have a clue......im trying to right a cookie that displays a DIV once a day for the user. I'm completely lost when it comes to cookies. i don't know if i wright the code for the div in the set cookie or in the get cookie section. I don't know....if someone could help me i would appreciate it very much. i would even appreciate any direction on where i can learn STEP BY STEP on how to create cookies even video's.
Here's a basic example using jQuery cookies:
The div should display the first time you access the page, but if you press run, it should disappear because you already saw it today. It won't show up again for 1 day. You can test it by deleting the cookie, then pressing run again.
This is me trying to Set the cookie...
I'm stuck on how to create the cookie string. I know i need to enter the expiration date but can't tell the right syntax to use. And i want the Experation date day to day.
I found this site which kinda gives a step by step approach.
function setCookie(name, value, expDate)
document.cookie = name + "=" + value
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)