Bug Tracker

Opened 10 years ago

Closed 10 years ago

#13747 closed bug (notabug)

.attr() should return String if no match is found, as per documentation

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:


Currently it returns undefined.

Change History (1)

comment:1 Changed 10 years ago by dmethvin

Resolution: notabug
Status: newclosed

The docs are already correct:

As of jQuery 1.6, the .attr() method returns undefined for attributes that have not been set. -- http://api.jquery.com/attr/

Note: See TracTickets for help on using tickets.