■ jQuery.cookie.js
https://github.com/carhartl/jquery-cookie
<script type="text/javascript" src="cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
使い方は
var hoge = $.cookie('the_cookie'); // get cookie $.cookie('the_cookie', 'the_value'); // set cookie $.cookie('the_cookie', 'the_value', { expires: 7 }); // set cookie with an expiration date seven days in the future $.cookie('the_cookie', '', { expires: -1 }); // クッキーの削除
$.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
$.cookie('cookiename','data',{ expires: 7 });//書き込み{保存days} document.write($.cookie('cookiename'));//読み出し