Bug Tracker

Opened 8 years ago

Closed 8 years ago

#9409 closed bug (invalid)

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

Reported by: dygerati@… 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/

Change History (1)

comment:1 Changed 8 years ago by timmywil

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/

Note: See TracTickets for help on using tickets.