I have this markup with me
<div id="message">
<h2>Some Heading</h2>
<span>
<img src="" alt="close"></img>
</span>
</div>
When I click on the image, the DIV disappears
$("#message").click(function() {
$(this).fadeOut("slow");
});
But when I refresh the page, it appears again. Now I found out that the jquery-cookie plugin is the way to go to make sure the DIV doesn't appear again but I am unable to wire it up with this example.
I basically want to set the cookie to hide the div for 7 days. After 7 days when someone visits the page, show the div again.
Any ideas?
Here's a fiddle http://jsfiddle.net/8gaGm/1/