Understanding jQuery data() storage
14 May
14 May 2013
It is a common misunderstanding that .data("key") is simply a shortcut for .attr("data-key").
.data() does read HTML5 data attributes, but this is only the first time it is called, as per the [documentation][1]:
The data- attributes are pulled in the first time the data property is accessed and then are no longer accessed or mutated (all data values are then stored internally i...