Bug Tracker

Opened 11 years ago

Closed 8 years ago

#2411 closed enhancement (invalid)

$.removeData could return the data

Reported by: klaus Owned by: klaus
Priority: minor Milestone: 1.2.4
Component: data Version: 1.2.3
Keywords: data Cc:
Blocked by: Blocking:

Description

It would be handy if $.removeData would return the data that is being removed.

Instead of

var data = $.data(el, 'data');
$.removeData(el, 'data');

it seems more intuitive (and less to type) to have:

var data = $.removeData(el, 'data');

Attachments (1)

removeData.diff (726 bytes) - added by flesler 11 years ago.
These are the necessary changes

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by flesler

Attachment: removeData.diff added

These are the necessary changes

comment:1 Changed 9 years ago by dmethvin

Component: coredata

comment:2 Changed 9 years ago by Rick Waldron

Owner: set to klaus
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a jsFiddle that outlines practical use cases for your enhancement request.

Additionally, test against the jQuery 0 GIT version to ensure the issue still exists. Be Excellent to eachother!

comment:3 Changed 8 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Automatically closed due to 14 days of inactivity.

Note: See TracTickets for help on using tickets.