-
Notifications
You must be signed in to change notification settings - Fork 16
/
jquery-cookie.jquery.txt
18 lines (12 loc) · 1.71 KB
/
jquery-cookie.jquery.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
JQUERY-COOKIE
ALTERNATIVES ==> #See js-cookie
VERSION ==> #Version 1.4.1 (UMD)
$.cookie()->{ VAR: "VAL" } #
$.cookie("VAR"[, FUNC("VAL")->VAL2])->"VAL" #
$.cookie("VAR", "VAL"[, OBJ]) #OBJ: path|domain STR, expires DATE|NUM (in days), secure BOOL
#VAL:
# - is passed through encode|decodeURIComponent() if $.cookie.raw false (def)
# - can be OBJ (JSON.stringify()) if $.cookie.json true (def: false)
$.removeCookie("VAR"[, OBJ]) #Must specify OBJ.path|domain