In the beginning (well, beginning with jQuery 1.2.3 in early 2008) there was the
Most jQuery code sets data values using the higher-level
.data() API; for example,
$("div").data("imaDiv", true) sets a boolean value on every
div in the document. This API, in turn, calls down to
jQuery.data() with each element to set the value. For completeness, there are also
.removeData() to remove data elements, and
jQuery.hasData() to determine if any data is currently set for an element.