Possible Duplicate:
How to set/unset cookie with jQuery?
So I have this extremely simple jQuery function... My question is, how do I add a cookie when the DIV is hidden (i.e. faded out)? I want the cookie to be active until browser or window close.
In short, when a "visitor" clicks a specified X on a DIV (i.e. class .updateCloseBTN), it will hide the DIV. But if the user refreshes or revisits the page, the DIV will be shown again. If the user closes the DIV via the function below, it should not be loaded again, regardless if the user refreshes or revisits the page. However, it the user closes the browser window or browser itself and return the site, it will appear...
// Update Prompt: Hide on 'X' click
$('.updateCloseBTN').click(function () {
$('.upgradeWrap').fadeOut(400);
});