Bug Tracker

Ticket #2411 (new enhancement)

Opened 6 months ago

$.removeData could return the data

Reported by: klaus Assigned to: anonymous
Type: enhancement Priority: minor
Milestone: 1.2.4 Component: core
Version: 1.2.3 Keywords: data
Cc: Needs: Review

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

removeData.diff (0.7 kB) - added by flesler 5 months ago.
These are the necessary changes

Change History

Changed 5 months ago by flesler

These are the necessary changes

Note: See TracTickets for help on using tickets.