Skip to main content

Bug Tracker

Side navigation

#9688 closed bug (duplicate)

Opened June 28, 2011 08:07PM UTC

Closed June 28, 2011 08:10PM UTC

Last modified June 28, 2011 08:10PM UTC

`data` and `attr` inconsistencies with numbers

Reported by: bentruyman Owned by:
Priority: high Milestone: 1.next
Component: data Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:
Description

It looks like the data method, when reading data attributes off of nodes, is doing some sort of type conversion on numbers.

See here: http://jsfiddle.net/MZ49R/

In this example, the attribute data-foo is set to "0001". When accessed via the data method, the number 1 is returned. When accessed via the attr method the string "0001" is returned.

My expectation is that data should return the same value as attr would.

Attachments (0)
Change History (2)

Changed June 28, 2011 08:10PM UTC by rwaldron comment:1

component: unfileddata
priority: undecidedhigh
resolution: → duplicate
status: newclosed

Changed June 28, 2011 08:10PM UTC by rwaldron comment:2

Duplicate of #7579.