The HTML5 specification allows custom data attributes to be added to
any DOM element. Each custom attibute name must be prefixed with
data-. An element's custom attributes may be conveniently
accessed through element.dataset, a mapping of (name, value) items
where each name is the custom attribute with the data- prefix
removed.
This jQuery plugin adds the jQuery.fn.dataset method. It may be
used in a similar manner to jQuery's built-in data and attr
methods.
Download: jquery.dataset.js
Tested: FF, Safari, Chrome, Opera, IE6, IE7, IE8
The use of "name" here means the name of a custom attribute without
the data- prefix.
Return an object with all custom attribute (name, value) items.
Return the value of the attribute `data-NAME'.
Set the value of attribtue `data-NAME' to VALUE.
Set many custom attributes at once.
Remove the attribute `data-NAME'.
Remove the attributes `data-N1', `data-N2', …