var some_var = $( some_jquery_selector ).attr( 'some_attribute_name' );
$( "div" ).data( "role" ) === "page";
$( "div" ).data( "lastValue" ) === 43;
$( "div" ).data( "hidden" ) === true;
$( "div" ).data( "options" ).name === "John";
function getAttributes ( $node ) {
var attrs = {};
$.each( $node[0].attributes, function ( index, attribute ) {
attrs[attribute.name] = attribute.value;
} );
return attrs;
}
<div data-role="page" data-last-value="43" data-hidden="true" data-options='{"name":"John"}'></div>