version 1.1.10
Return cookie or null if cookie was not created
arguments:
- name - name of cookie
- value - value of cookie
- options - object
- options.path - path from where cookie will be readable, default "/"
- options.domain - domain from where cookie will be readable (is not set by default)
- options.duration - time after which cookie will expire in minutes (session lifetime is set by default)
- options.secure - true/false (default)
$.setCookie('lorem', 'ipsum');
// create cookie lorem with value ipsum
Return cookie value.
arguments:
- name - name of the cookie
$.getCookie('lorem');
// return value of cookie "lorem"
Return names of all cookies as array.
$.getCookies();
// return eg ["lorem", "PHPSSID", "show_modal",...]
Checks if cookie exist or not. Return true if cookie exist, false if not.
arguments:
- name - name of the cookie
$.hasCookie('lorem');
// return true
Return content of deleted cookie
arguments:
- name - name of the cookie
- path - path from where cookie will be readable, default "/"
- domain - domain from where cookie will be readable (is not set by default)
$.removeCookie('lorem');
// return eg "lorem=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT"