Here is my html code
<li class="current" title="some title" data-atype="some type" data-aid="119697371285186601">
Some text
</li>
This is what I get from the firebug / google chrome debugger console,
>> $().jquery
"1.7.2"
>> ($('li.current:first')).data('aid')
119697371285186610
>> ($('li.current:first')).attr('data-aid')
"119697371285186601"
I searched for the issue and I could not find the exact reason and solution for the issue. If anybody could help me to find out a solution and the cause of the problem, it would be really helpful.
Thanks in advance…
$.fn.datatries to be smart about numeric types and converts them to integers. Integers however, in JavaScript, are nothing but floats and, thus, get less precise as they approach larger values. I’d stick withattr()since that will always return a string. There is also a ticket for this but it’s marked “WONTFIX”. For more information on the limitations of large numbers in JavaScript, see this article.