I want to use jQuery cookie, but I cant find the cookie method
What should I do, which is the best jQuery cookie 开发者_高级运维 plugin?
Thanks.
You can use the jquery-cookie plugin available at Github: https://github.com/carhartl/jquery-cookie
You can set the cookie value by:
$.cookie('cookie_name', 'cookie_value');
And get the value back by:
var cval = $.cookie('cookie_name');
And delete the cookie by:
$.cookie('cookie_name', null);
Check out:
- Setting cookies with jQuery
- jQuery & Cookies (get/set/delete & a plugin)
精彩评论