Advertisement
Guest User

Untitled

a guest
May 4th, 2016
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. // You can seriaize the data as JSON, like this:
  2. $.cookie("property-name", JSON.stringify($("#foo").data()));
  3.  
  4. // Get data from the cookie:
  5. $("#foo").data(JSON.parse($.cookie("property-name")));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement