Bug Tracker

Ticket #10444 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

jQuery.data and $().data are different things

Reported by: sir.mordred.service@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.4
Keywords: Cc:
Blocking: Blocked by:

Description

I've read 10027, and I'm still scratching my head and the docs say nothing on this. Are these supposed to be different?

Here's a fiddle:

 http://jsfiddle.net/JenDy/5/

It says: false - b - c Should say: true - b - b

Change History

comment:1 Changed 3 years ago by ajpiano

  • Status changed from new to closed
  • Resolution set to invalid

The first argument that is to be passed to jQuery.hasData and jQuery.data is a DOM element, *not* a jQuery object. When you follow this (documented) requirement, I believe the results are as expected.

 http://jsfiddle.net/JenDy/6/

Note: See TracTickets for help on using tickets.