Skip to main content

Bug Tracker

Side navigation

#9409 closed bug (invalid)

Opened May 23, 2011 11:14PM UTC

Closed May 23, 2011 11:56PM UTC

Using attr() method to retrieve attribute that doesn't exist returns 'undefined'

Reported by: dygerati@gmail.com Owned by:
Priority: low Milestone: 1.next
Component: attributes Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:
Description

This is regarding the attr() method, and attempting to fetch that value of an attribute that doesn't exist.

In 1.5.2, an empty string is returned.

In 1.6, the value is undefined.

This has been illustrated in the this jsFiddle:

http://jsfiddle.net/Dygerati/PExUP/

Attachments (0)
Change History (1)

Changed May 23, 2011 11:56PM UTC by timmywil comment:1

component: unfiledattributes
priority: undecidedlow
resolution: → invalid
status: newclosed

1.5.2 also returned undefined, but not as consistently as the current jQuery. This is intended behavior.

http://jsfiddle.net/timmywil/7uajj/