Side navigation
#10095 closed bug (duplicate)
Opened August 19, 2011 12:23PM UTC
Closed August 19, 2011 12:52PM UTC
Last modified August 19, 2011 12:52PM UTC
removeData does not remove data- attributes
| Reported by: | Kruncher | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.6.2 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
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?