Jump to content


Assign value to cookie

  • Please log in to reply
No replies to this topic

#1 jarvis

  • Members
  • PipPipPip
  • Advanced Member
  • 408 posts

Posted 03 July 2014 - 11:47 AM

Hi All,


I hope someone can help!


I've got some code that passes an array of values via an ajax call. This works fine and I can see my values in the specified div:


What I'd like to do, is get that info and pass it to a cookie. However, I'm struggling a tad. I currently have this:

var set_me = html(data);
$.cookie('choice',set_me, {expires: 7, path: '/'});
alert( $.cookie("choice") );

But sadly it's not working. I think it's something simple but this is new to me some need some help please



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users