What is wrong with these jQuery data()
assignments? When I wrap the first in a console.log()
, it works and prints out the data.
But jsbin shows tons of errors that I can't put my finger on?
$("body").data("user_information", {});
$("body").data("user_information", {
contact_info: {},
billing_info: {}
});
console.log($("body").data("user_information").contact_info, {name: "paul", company: "testCo"});
$("body").data("user_information").contact_info, {
name: "paul",
company: "testCo"
};
$("body").data("user_information").billing_info, {
name: "steve",
company: "testCo"
};