Monday, September 7, 2009

jQuery cookie plugin

jQuery cookie plugin makes the cookie handling so simple.

First you have to include jquery.cookie.js plugin
and your work is done..

simple code to manipulate cookie.

Set cookie
$.cookie(cookiename, cookievalue,{expires: 30});
Note: expires takes the time duration in days

Get cookie
$.cookie(cookiename);

Delete cookie
$.cookie(cookiename, null,{expires: 30});

Click here to download jquery.cookie plugin

No comments:

Post a Comment