Bug Tracker

Modify

Ticket #9792 (closed bug: duplicate)

Opened 23 months ago

Last modified 23 months ago

data() not saved when using '0' as data and hypernated key

Reported by: radhike123@… Owned by:
Priority: low Milestone: 1.next
Component: data Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

Description

When data is set using $(selector).data('test-data',0), undefined is returned when using $(selector).data('test-data');

Example: ->  http://jsfiddle.net/Xmqnf/

This does not occur in jQuery 1.6.1

Change History

comment:1 Changed 23 months ago by rwaldron

  • Priority changed from undecided to low
  • Resolution set to duplicate
  • Status changed from new to closed
  • Component changed from unfiled to data

comment:2 Changed 23 months ago by rwaldron

Duplicate of #9301.

comment:3 Changed 23 months ago by radhike123@…

Hi, rwaldron, are you sure this is fixed? This behavior is only integer 0 in concern.

See this for example: ->  http://jsfiddle.net/PeZad/1/ work perfectly in 1.6.2 and 1.6.1

comment:4 Changed 23 months ago by rwaldron

There was a larger concern, that I opened a new ticket for: http://bugs.jquery.com/ticket/9794

comment:5 Changed 23 months ago by radhike123@…

ok, I'll be following the new ticket then...

Thanks..

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.