Skip to main content

Bug Tracker

Side navigation

#9228 closed bug (wontfix)

Opened May 11, 2011 06:46AM UTC

Closed May 11, 2011 02:49PM UTC

Last modified May 30, 2012 09:56AM UTC

I can't get 'tagName' attribute from version 1.6.

Reported by: kormandk@naver.com Owned by:
Priority: low Milestone: 1.6.1
Component: attributes Version: 1.6
Keywords: Cc:
Blocked by: Blocking:
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.

Attachments (0)
Change History (4)

Changed May 11, 2011 12:30PM UTC by addyosmani comment:1

component: unfiledattributes
keywords: → needsreview
priority: undecidedlow
status: newopen

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.

Changed May 11, 2011 02:49PM UTC by timmywil comment:2

keywords: needsreview
milestone: 1.next1.6.1
resolution: → wontfix
status: openclosed

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.

Changed March 15, 2012 06:30PM UTC by anonymous comment:3

Replying to [comment:2 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.

Changed May 30, 2012 09:56AM UTC by anonymous comment:4

tagName