Bug Tracker

Ticket #2768 (new enhancement)

Opened 4 months ago

Last modified 4 months ago

data should accept a hash

Reported by: scott.gonzalez Assigned to: anonymous
Type: enhancement Priority: major
Milestone: 1.2.4 Component: core
Version: 1.2.3 Keywords:
Cc: Needs: Review

Description

data should support

$(el).data({
    key1: val1,
    key2: val2
});

as an equivalent of:

$(el).data('key1', 'val1').data('key2', 'val2');

Attachments

2768-data_from_hash.diff (394 bytes) - added by Morgan 4 months ago.
add data from hash

Change History

Changed 4 months ago by Morgan

add data from hash

Changed 4 months ago by Morgan

The patch check if key is an object, if so it sets data for each key/val pair.

Changed 4 months ago by flesler

  • type changed from bug to enhancement
Note: See TracTickets for help on using tickets.