Bug Tracker

Modify

Ticket #10095 (closed bug: duplicate)

Opened 3 years ago

Last modified 3 years ago

removeData does not remove data- attributes

Reported by: Kruncher Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

Description

The removeData function does not remove data attributes that were present in original HTML. This seems inconsistent with usage of data function.

<div data-test="42"></div>

$('div').data('test') === "42"; // true
$('div').removeData('test');
$('div').data('test') === "42"; // true

The removeAttr function works, surely removeData should do the same?

Change History

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

comment:2 Changed 3 years ago by dmethvin

Duplicate of #10026.

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.