开发者

How to use local storage to keep a users favorites list intact upon successive visits

开发者 https://www.devze.com 2023-01-22 08:47 出处:网络
So i have a web applicati开发者_如何学Con I\'ve developed using jquery and some jqtouch. I have javascript functions to clone list items to another \"favorites\" list if the user so chooses.

So i have a web applicati开发者_如何学Con I've developed using jquery and some jqtouch. I have javascript functions to clone list items to another "favorites" list if the user so chooses.

My question is how can I use localStorage to keep their favorites in the list when they come back into the web application?

I can't seem to find a straight forward answer..

Am I supposed to store the cloned values? or the original li elements? or the functions? I'm totally lost, so any help would be appreciated, cheers.


take a look at lawnchair it is a js library for utilizing various local storage solutions on mobile devices.

Decent video tutorial here

0

精彩评论

暂无评论...
验证码 换一张
取 消