Bug Tracker

Modify

Ticket #9461 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

removeData not working for names with a "-"

Reported by: sieber@… Owned by:
Priority: high Milestone: 1.next
Component: data Version: 1.6.1
Keywords: Cc:
Blocking: Blocked by:

Description

When using names containg a "-" character in the data's name the removeData function does not work. Here some steps to reproduce:

var $b = $('body'); $b.data('x-y', 1); console.log($b.data('x-y')); ok, this shows a 1 $b.removeData('x-y'); console.log( $b.data('x-y') ); not ok, this shows still a 1, should show undefined

Change History

comment:1 Changed 2 years ago by rwaldron

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

comment:2 Changed 2 years ago by rwaldron

Duplicate of #7328.

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.