Ticket #7665 (closed bug: worksforme)
$.fn.data broken in jQuery 1.4.4 (related to pulling HTML5 data- attributes)
| Reported by: | cobexer | Owned by: | cobexer |
|---|---|---|---|
| Priority: | high | Milestone: | 1.5 |
| Component: | data | Version: | 1.5 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
in jQuery 1.4.4 calling $(window).data() results in an error same for document(and everything that has no attributes property)
Change History
comment:3 Changed 2 years ago by rwaldron
- Status changed from pending to closed
- Resolution set to duplicate
It sure is. Thanks Jitter
comment:5 Changed 2 years ago by cobexer
I now added https://github.com/jquery/jquery/pull/115 to fix this, then realized it was closed as duplicate however the other tickets (and the linked commits) do not seem to cover this.
please have a look at the changes i made
comment:6 Changed 2 years ago by jitter
- Status changed from closed to reopened
- Resolution duplicate deleted
comment:7 Changed 2 years ago by jitter
- Priority changed from undecided to high
- Status changed from reopened to open
- Component changed from unfiled to data
- Milestone changed from 1.next to 1.4.5
comment:10 Changed 2 years ago by john
- Status changed from assigned to pending
The approach taken in #7500 is certainly different but it covers the case handled here (and in a much better way). Can you please re-test now that the code is landed? Thanks!
comment:11 Changed 2 years ago by rwaldron
- Status changed from pending to closed
- Resolution set to worksforme
I just ran the test against all the supported browsers using jQuery 0 GIT and it no longer throws an exception.
comment:12 Changed 2 years ago by john
- Version changed from 1.4.4 to 1.5
There wasn't a 1.4.5 release, was actually 1.5.
comment:13 Changed 2 years ago by john
- Milestone changed from 1.4.5 to 1.5
There was no 1.4.5 release, was actually 1.5.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!
Additionally, test against the latest jQuery release AND the jQuery 0 GIT version to ensure the issue still exists. Be Excellent to eachother!