Created by Syntacticx
Cookie
Programmer friendly JavaScript cookie API.
Cookie provides a more humane wrapper for reading and writing JavaScript cookies. All cookies set are relative to the current domain.
Example
Cookie.get('key'); //null
Cookie.set('key','value');
Cookie.get('key'); //'value'
Cookie.unset('key');
Cookie.get('key'); //null
Cookie.observe('get',function(key){
console.log('Attempting to read Cookie key: ' + key);
});
Class
| Return | Name | Description |
| mixed | get(string name) | Returns null if the value was not found. |
| null | set(string name, mixed value [,number seconds_to_expiry]) | |
| mixed | unset(string name) | Returns null if the value was not found. |
Events
| Name | Description |
| get(string name) | |
| set(string name, mixed value) | |
| unset(string name) | |