14 May 2013
It is a common misunderstanding that
.data("key") is simply a shortcut for
.data() does read HTML5 data attributes, but this is only the first time it is called, as per the [documentation]:
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...