Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#8709 closed bug (duplicate)

.data() converting string to number

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:


I found a strange one. Grabbing a data attribute of an element with a certain value causes jQuery to convert the value to a number in scientific notation.


<script>$("#test").click(function(){alert($(this).data("code") + "\n" + $(this).attr("data-code"));});</script>
<a href="#" data-code="2309E34" id="test">Test</a>

The result is:

I have tested this is in Firefox V4, Chrome 10, and IE9 with the same result.

Change History (3)

comment:1 Changed 12 years ago by [email protected]

Sorry, I didn't see the notice about jsFiddle before. Here is a link to the test case I entered:


comment:2 Changed 12 years ago by ajpiano

Resolution: duplicate
Status: newclosed

comment:3 Changed 12 years ago by ajpiano

Duplicate of #7579.

Note: See TracTickets for help on using tickets.