/jQueryCookiePlugin

Use this mini plugin to easily get/add/delete/modify browser cookies.

Primary LanguageJavaScript

Current Version: jQuery Cookie Plugin v0.2

Use this mini plugin to easily get/add/delete/modify browser cookies.

To get value of a cookie:
$.cookie(cookieName);

To add or modify a cookie:
$.cookie(cookieName,cookieValue,moreAttributes);

To delete a cookie:
$.cookie(cookieName,'');

Note:
cookieName should be a String, like: 'wp-settings-1';
cookieValue should be a String or a Number;
moreAttributes should be an {Object} include these items: expires, domain, path, secure.
You can read details at http://en.wikipedia.org/wiki/HTTP_cookie#Domain_and_Path
By default, moreAttributes = {expires : 30}

History:
2011.11.30 | v0.2
2011.11.04 | v0.1

Author: Phoetry
Blog: http://phoetry.me
Plugin Page: http://phoetry.me/archives/jquery-cookie.html
GitHub Page: https://github.com/phoetry/jQueryCookiePlugin

Thank you.