Skip to main content

Bug Tracker

Side navigation

#13426 closed bug (notabug)

Opened February 10, 2013 06:50AM UTC

Closed February 10, 2013 05:53PM UTC

Strange behavior in jQuery's .data method.

Reported by: Owned by:
Priority: undecided Milestone: None
Component: data Version: 2.0b1
Keywords: Cc:
Blocked by: Blocking:

I have described and displayed the bug in a jsFiddle as requested. It is well commented so I don't need to put too much detail here.

Just a small bug, I still like jQuery. :)

Attachments (0)
Change History (2)

Changed February 10, 2013 01:44PM UTC by dmethvin comment:1

owner: →
status: newpending

Can you please update your test case to only pass **DOM elements** to as documented? If there are still issues we can go from there.

Changed February 10, 2013 05:53PM UTC by gibson042 comment:2

component: unfileddata
resolution: → notabug
status: pendingclosed

You seem to be confusing the utility for the .data instance method. The former expects a DOM element or (occasionally) plain object, and should ''not'' be passed a jQuery collection because it will have no effect on the referenced elements. In almost all cases you'll want to use the method, as on lines 39 and 40 of