.data() also ignores the value of the element's data-x property.  So if data() is used to write, it should be used to read everywhere, too.  There were places where it was being used to unpack JSON already -- I'm just making this consistent.