Bug Tracker

Opened 9 years ago

Closed 7 years ago

#2768 closed enhancement (fixed)

data should accept a hash

Reported by: scottgonzalez Owned by: flesler
Priority: major Milestone: 1.4
Component: data Version: 1.2.3
Keywords: Cc: scottgonzalez
Blocked by: Blocking:


data should support

    key1: val1,
    key2: val2

as an equivalent of:

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

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Morgan

add data from hash

comment:1 Changed 9 years ago by Morgan

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

comment:2 Changed 9 years ago by flesler

  • Type changed from bug to enhancement

comment:3 Changed 8 years ago by flesler

  • Cc scott.gonzalez added
  • Component changed from core to data
  • Milestone changed from 1.2.4 to 1.3.3
  • need changed from Review to Patch
  • Owner set to flesler
  • Status changed from new to assigned

comment:4 Changed 7 years ago by dmethvin

  • Resolution set to fixed
  • Status changed from assigned to closed

As of 1.4, .data() accepts a hash.

Note: See TracTickets for help on using tickets.