Bug Tracker

Opened 12 years ago

Closed 12 years ago

#9591 closed bug (fixed)

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:


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.

Change History (2)

comment:1 Changed 12 years ago by Rick Waldron

Component: unfiledcore
Keywords: needsdocs added
Priority: undecidedlow
Status: newopen

Thanks, tagged as "needsdocs"

comment:2 Changed 12 years ago by addyosmani

Cc: kwedberg added
Keywords: neededdocs added; needsdocs removed
Resolution: fixed
Status: openclosed

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

Note: See TracTickets for help on using tickets.