Tillfredsställelse för slutanvändaren är en viktig del i mitt intresse, och med
mina goda kunskaper inom både front- och backend programmering ger jag
allt jag har för att dra mitt strå i stacken till en bättre webb för oss alla.

Cookie plugin for jQuery

Postad: 25 mars, 2009 av Emil Stjerneman

Taggar: cookie,   JavaScript,   jQuery

This is an extremely easy plugin I found. It is made by Klaus Hartl and it makes the work with cookies very slightly.

Just take a look at the examples:

$.cookie('the_cookie', 'the_value');
// Create a cookie with all available options.

$.cookie(
'the_cookie',
'the_value', { 
    expires: 7, 
    path: '/', 
    domain: 'jquery.com',
    secure: true 
  }
);
// Create a cookie with all available options.

$.cookie('the_cookie', null);
// Delete a cookie by passing null as value. Keep in mind that you have to use the same 
// path and domain used when the cookie was set 

More information can be found at http://plugins.jquery.com/project/Cookie

Kommentarer

Skriv kommentar

Skriv ny kommentar