I can't seem to get this to store. I now that the id and name are definitely valid as I alerted them out right before this code was called:
$('#carText').data("carId", carId);
$('#carText').data("carName", carName);
alert("value stored for carId: " + $("#carText").data("carId").carId);
I get undefined when I try to alert out the value that I supposedly stored.
alert("value stored for carId: " + $("#carText").data("carId"));should work