jquery cookie

· 14년 전 · 5244 · 3

Installation

Include script after the jQuery library (unless you are packaging scripts somehow else):

<script src="/path/to/jquery.cookie.js"></script>

Usage

Create session cookie:

$.cookie('the_cookie', 'the_value');

Create expiring cookie, 7 days from then:

$.cookie('the_cookie', 'the_value', { expires: 7 });

Create expiring cookie, valid across entire page:

$.cookie('the_cookie', 'the_value', { expires: 7, path: '/' });

Read cookie:

$.cookie('the_cookie'); // => 'the_value'
$.cookie('not_existing'); // => null

Delete cookie by passing null as value:

$.cookie('the_cookie', null);
|

댓글 3개

오 쿠키 플러그 인이군요 간단하네요
흠..........
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
14년 전 조회 4,509
14년 전 조회 4,771
14년 전 조회 3,540
14년 전 조회 3,570
14년 전 조회 8,505
14년 전 조회 5,564
14년 전 조회 4,903
14년 전 조회 4,492
14년 전 조회 2.5만
14년 전 조회 5,245
14년 전 조회 8,973
14년 전 조회 3,790
14년 전 조회 7,555
14년 전 조회 4,536
14년 전 조회 4,600
14년 전 조회 5,181
14년 전 조회 4,233
14년 전 조회 3,105
14년 전 조회 3,964
14년 전 조회 6,884
🐛 버그신고