jQuery cookies - set, get and delete
jQuery can be used to play around with cookies..
As simple as:
Set a cookie: $.cookie('the_cookie', 'the_value');
Get a cookie: $.cookie('the_cookie');
Delete a cookie: $.cookie('the_cookie', null);
There is also :
$.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
See it below in action :)
As simple as:
Set a cookie: $.cookie('the_cookie', 'the_value');
Get a cookie: $.cookie('the_cookie');
Delete a cookie: $.cookie('the_cookie', null);
There is also :
$.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
See it below in action :)
Labels: cookie, guest, javascript, jquery, js, login, logoff, username, visitor