Bug Tracker

Opened 6 years ago

Closed 6 years ago

#13747 closed bug (notabug)

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

Reported by: oliverjash@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

Currently it returns undefined.

Change History (1)

comment:1 Changed 6 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.