Skip to main content

Bug Tracker

Side navigation

#13747 closed bug (notabug)

Opened April 07, 2013 05:05PM UTC

Closed April 07, 2013 05:21PM UTC

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

Reported by: oliverjash@icloud.com Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:
Description

Currently it returns undefined.

Attachments (0)
Change History (1)

Changed April 07, 2013 05:21PM UTC by dmethvin comment:1

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/