Hi guys, i'm using the jquery cookie plugin. Everything works fine except the fact that I have no idea how to set an expiration-time for the cookie?
$.cookie('opt_visible', 'true');
the jquery-cookie documentation says:
hoursToLive (DEPRECATED for expiresAt)
- NUMBER
- For how many hours should the cookie be valid? (Passing 0 means to delete the cookie at the end of the browser session--this is default. Negative values will delete the cookie, but you should use the del() method instead.)
That's exactly what I'd like to have. The cookie should be available as long as i'm browsing the site. As soon as i close the window or browsertab, the cookie should be deleted.
How can i implement this hoursToLive thingy to my mentioned line above?
Thank you