Skip to main content

Bug Tracker

Side navigation

#9940 closed bug (invalid)

Opened July 29, 2011 07:49PM UTC

Closed July 29, 2011 07:55PM UTC

Last modified October 07, 2011 06:21PM UTC

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
Attachments (0)
Change History (2)

Changed July 29, 2011 07:55PM UTC by timmywil comment:1

component: unfileddata
priority: undecidedlow
resolution: → invalid
status: newclosed

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

Changed October 07, 2011 06:21PM UTC by rwaldron comment:2

#10452 is a duplicate of this ticket.