create, read, and erase cookies with jquery [duplicate]
Set a cookie
$.cookie("example", "foo"); // Sample 1
$.cookie("example", "foo", { expires: 7 }); // Sample 2
$.cookie("example", "foo", { path: '/admin', expires: 7 }); // Sample 3
Get a cookie
alert( $.cookie("example") );
Delete the cookie
$.removeCookie("example");
Comments
Post a Comment