Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9940 closed bug (invalid)

Data Attributes Can't Be Set on object Elements

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: data Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:

Description

Data attributes can be set on regular elements like so:

el = $('div'); el.data('foo', 'bar'); el.data('foo') 'bar'

But they don't seem to work for object elements:

el = $('object'); el.data('foo', 'bar') el.data('foo') undefined

Change History (2)

comment:1 Changed 8 years ago by timmywil

Component: unfileddata
Priority: undecidedlow
Resolution: invalid
Status: newclosed

This is expected behavior. http://api.jquery.com/data

comment:2 Changed 8 years ago by Rick Waldron

#10452 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.