I am designing a website that has 100% width + height div containing a graphic overlaying the home page. I want to show this once to the user when they first visit the site, a kind of welcome to the site click here to enter then this would never been shown to that user again.
How do I write a cookie with Jquery to do this? Many thanks.
You can try using the jQuery Cookie Plugin.
The cookie is a form of persistent storage. When a user loads the page, you check if he has a certain cookie. If he doesn’t, you show him the splash page and set the cookie. If he has the cookie set that means he’s been here before and you don’t need to do anything. The following code could be a solution, but I’m writing it out of my head so you’d probably have to modify it a bit. It assumes you’re using the plugin above.
I think that it’s pretty self explanatory. Note that the cookie expires, research how to make it last as long as you want.
Hope this helps :).