Answer the question
In order to leave comments, you need to log in
Why isn't an array being collected from jquery cookie?
Good afternoon! There is a catch that I can't figure out:
I'm creating an array
from the data I'm collecting for it.
jsonObj={'cid':item_id, 'q':item_count};
//потом в нужный мне момент я пушу все это в массив и все хорошо
items.push(jsonObj);
$.cookie('arrcrt', JSON.stringify(items),{ expires: 1});
if($.cookie('arrcrt')!=null)
{
<b>items = $.parseJSON($.cookie('arrcrt'));</b>
lastid=items.length;
$.each(items, function (key, value) {
//некоторый код который не дает ошибки
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question