$.ajax({
type: 'POST',
url: 'xxxx.com/init',
ContentType: 'application/json',
dataType: 'json',
data: data,
success: function(resp) {
$.cookie("tc", resp.tokenCode);
}
});
console.log($.cookie("tc"));
I try to create a cookie inside success, but it doesnt seem working. it logs undefined...