Side navigation
#2316 closed enhancement (wontfix)
Opened February 11, 2008 12:32PM UTC
Closed November 11, 2010 01:09AM UTC
Last modified January 31, 2011 05:54PM UTC
removeData for complete namespaces
Reported by: | klaus | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.5 |
Component: | data | Version: | 1.5 |
Keywords: | data | Cc: | |
Blocked by: | Blocking: |
Description
The removeData methods should work on complete namespaces - similiar to unbind - so instead of
$(el).removeData('foo.ns').removeData('bar.ns');
you can write:
$(el).removeData('.ns');
Attachments (0)
Change History (7)
Changed June 20, 2010 05:45PM UTC by comment:1
component: | core → data |
---|
Changed November 03, 2010 09:48PM UTC by comment:2
This seems like a reasonable enhancement, and would make the api more consistent to allow for namespacing data within .data()
Changed November 04, 2010 12:35AM UTC by comment:3
keywords: | data → data needsreview |
---|---|
milestone: | 1.2.4 |
priority: | minor → low |
version: | 1.2.3 → 1.4.4rc |
The .data
method doesn’t do namespacing like that. Namespacing for .data
would look more like:
$('#foo').data('bar', {}); $('#foo').data('bar').baz = 2; $('#foo').removeData('bar');
I am pretty sure this will be wontfix but gonna discuss it with some folks.
Changed November 10, 2010 10:51PM UTC by comment:4
milestone: | → 1.4.5 |
---|
Changed November 11, 2010 01:09AM UTC by comment:5
keywords: | data needsreview → data |
---|---|
resolution: | → wontfix |
status: | new → closed |
The period is not currently a special character in
.data()names. Implementing this could cause regressions for anyone who used names that contained a period.
It's simple for a user to implement their own namespace by assigning a Javascript object to a simply-named
.data()item.
Changed January 31, 2011 05:53PM UTC by comment:6
version: | 1.4.4rc → 1.5 |
---|
There wasn't a 1.4.5 release, was actually 1.5.
Changed January 31, 2011 05:54PM UTC by comment:7
milestone: | 1.4.5 → 1.5 |
---|
There was no 1.4.5 release, was actually 1.5.