Modify ↓
Ticket #2768 (closed enhancement: fixed)
data should accept a hash
| Reported by: | scott.gonzalez | Owned by: | flesler |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | data | Version: | 1.2.3 |
| Keywords: | Cc: | scott.gonzalez | |
| Blocking: | Blocked by: |
Description
data should support
$(el).data({
key1: val1,
key2: val2
});
as an equivalent of:
$(el).data('key1', 'val1').data('key2', 'val2');
Attachments
Change History
Changed 5 years ago by Morgan
-
attachment
2768-data_from_hash.diff
added
comment:1 Changed 5 years ago by Morgan
The patch check if key is an object, if so it sets data for each key/val pair.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

add data from hash