Skip to content

Instantly share code, notes, and snippets.

@hiroshido
Created December 16, 2013 04:23
Show Gist options
  • Save hiroshido/7982293 to your computer and use it in GitHub Desktop.
Save hiroshido/7982293 to your computer and use it in GitHub Desktop.
jquery.cookie.jsの使い方とCOOKIEの寿命(保存期間)を秒・分・時間で指定する方法 ref: http://qiita.com/unamu/items/06e88a53f101ae8d2700
// jsonの自動パース:
$.cookie.json = true;
// オブジェクトにまとめてといてそのまま突っ込める
var jsonData = new Object();
jsonData.title = "タイトル";
jsonData.url = "exsample.com";
jsonData.description = "概要";
$.cookie("jsonData", jsonData);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment