<ul>
<li class="current" title="some title" data-atype="some type" data-rrr="11969737128518660155555">
Some text
</li>
</ul>
<span></span>
$(document).ready(function(){
$('span').html('DATA ATTRIBUTE: '+$('li.current:first').data('rrr')+ ' <br /> ATTRIBUTE: '+ $('li.current:first').attr('data-rrr'));
});
Output / result:
Some text
DATA ATTRIBUTE: 1.1969737128518661e+22
ATTRIBUTE: 11969737128518660155555
http://jsfiddle.net/nanoquantumtech/usydd/#base
//================================================= ========//
<ul>
<li class="current" title="some title" data-atype="some type" data-test1="119697371285186601555" data-test2="11969737128518660155555">Some text
</li>
</ul>
<span></span>
$(document).ready(function() {
$('span').html('DATA ATTRIBUTE: <br />' + $('li.current:first').data('test1')+ ' , <br /> '+$('li.current:first').data('test2') + '<br /><br /> ATTRIBUTE: <br />' + $('li.current:first').attr('data-test1')+' , <br />'+$('li.current:first').attr('data-test2'));
});
Out Put For jquery version < 1.7.2
Some text
DATA ATTRIBUTE:
119697371285186610000 ,
1.1969737128518661e+22
ATTRIBUTE:
119697371285186601555 ,
11969737128518660155555
演示 1
Out Put For jquery version 1.8.2
Some text
DATA ATTRIBUTE:
119697371285186601555 ,
11969737128518660155555
ATTRIBUTE:
119697371285186601555 ,
11969737128518660155555
演示 2