javascript - Can't get jStorage to pull user object - keeps saying "user is null" -
i can't jstorage work. when test following code result "user null" how user return proper value , target attributes exist in mysql database.
var user = $.jstorage.get('user'); console.log('user ' + user);
did set user before it? try
var user = $.jstorage.get("user"); if(!user){ user = 'someuser'; $.jstorage.set("user",value); }
Comments
Post a Comment