Skip to main content

Bug Tracker

Side navigation

#9591 closed bug (fixed)

Opened June 15, 2011 12:06PM UTC

Closed June 17, 2011 07:12AM UTC

Documentation for .add() fails to mention that it can take another jQuery object

Reported by: Timwi Owned by:
Priority: low Milestone: 1.next
Component: core Version: 1.6.1
Keywords: neededdocs Cc: kwedberg
Blocked by: Blocking:
Description

Through trial and error it seems to be possible to combine two collections of elements with .add():

var a = $(".x"), b = $(".y");

a.add(b).doSomething(...);

However, the documentation (http://api.jquery.com/add/) doesn’t mention this. It should.

Attachments (0)
Change History (2)

Changed June 15, 2011 03:26PM UTC by rwaldron comment:1

component: unfiledcore
keywords: → needsdocs
priority: undecidedlow
status: newopen

Thanks, tagged as "needsdocs"

Changed June 17, 2011 07:12AM UTC by addyosmani comment:2

cc: → kwedberg
keywords: needsdocsneededdocs
resolution: → fixed
status: openclosed

Our docs have been updated accordingly: http://api.jquery.com/add/