Ticket #9228 (closed bug: wontfix)
I can't get 'tagName' attribute from version 1.6.
| Reported by: | kormandk@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.6.1 |
| Component: | attributes | Version: | 1.6 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I can't get 'tagName' attribute from version 1.6.
when i trace, '$('#tagID').attr('tagName') is undefined.'
but I can get tagName of $('#tagID').attr('tagName') from version 1.5.2.
I hope that I receive your respond ASAP.
thanks.
Change History
comment:1 Changed 2 years ago by addyosmani
- Keywords needsreview added
- Priority changed from undecided to low
- Status changed from new to open
- Component changed from unfiled to attributes
comment:2 follow-up: ↓ 3 Changed 2 years ago by timmywil
- Keywords needsreview removed
- Status changed from open to closed
- Resolution set to wontfix
- Milestone changed from 1.next to 1.6.1
The new http://api.jquery.com/prop method should be used to retrieve tagName since tagName is not an attribute, but a property. This may have worked with attr in the past, but was not supported.
comment:3 in reply to: ↑ 2 Changed 14 months ago by anonymous
Replying to timmywil:
The new http://api.jquery.com/prop method should be used to retrieve tagName since tagName is not an attribute, but a property. This may have worked with attr in the past, but was not supported.
According to your 1.6.1 release notes there is no change of the functionality of the attr method between 1.5.2 and 1.6.1. This is not true based on the resolution to this ticket. You should update your release notes for 1.6.1 letting people know that there is in fact a difference. attr("tagName") will not give you the same results in 1.5.2 as it does in 1.6.1. People should be informed so they can update their code.
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 submitting a ticket to the jQuery project. .attr('tagName') doesn't appear to have been documented as working, however I see in this test case http://jsfiddle.net/SjdcX/3/ that it was behaving as mentioned in your ticket all the way back to jQuery 1.3.2. As such this is a regression.
I'll leave this open so that another member of the team can review.