Writing a cookie:
(function(){
// erase any existing instances
eraseCookie('nameOfCookie');
// bind a change event to the cookie
$("input:radio[name:'radioName']").bind( 'change',function(){
//write the cookie
createCookie('extrasCookie',$(this).val(),7);
})
})();
Reading the cookie:
(function(){
if(readCookie('extrasCookie')=="1"){
// do something based on the results
}
})();
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment