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.
don't need the .cardId at the end
alert("value stored for carId: " + $("#carText").data("carId"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With