How to save multiple data variables into one cookie, using jQuery
I have made pagination with jQuery and now I would like to save the selected state/page to cookie. I would need to save tab-id, offset and limit values.
I know that I can write to cookie like this:
开发者_如何学Python$.cookie("example", "foo");
And then read it:
$.cookie("example");
But how I can save all those three thing into cookie? And especially read it?
For example, if I need to know just the tab-id value from the cookie, how can I get that if I have multiple values in cookie?Also all help/info on how to do a saving page state (pagination) is appreciated.
And jQuery site is down, I checked that first
:p Thanks.You can either set 3 different cookies, or create a JSON object and store that string as your one cookie.
精彩评论