jQuery Cookie Example

In this article I will show you how to set, Get, delete and edit cookie with jQuery.
First of all we need jQuery library (jquery-1.3.2.min.js) or any latest version and jQuery Cookie plugin (jquery.cookie.js) which you can download from here
Set Cookie

Get value of Cookie

delete Cookie:

Additionally, to set a timeout of a certain number of days (10 here) on the cookie:

Note: If the expires option is omitted, then the cookie becomes a session cookie, and is deleted when the browser exits.

To cover all the options:

Demo

Code:

Thanks.