Bug Tracker

Opened 5 years ago

Closed 5 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 5 years ago by rwaldron

  • Component changed from unfiled to core
  • Keywords needsdocs added
  • Priority changed from undecided to low
  • Status changed from new to open

Thanks, tagged as "needsdocs"

comment:2 Changed 5 years ago by addyosmani

  • Cc kwedberg added
  • Keywords neededdocs added; needsdocs removed
  • Resolution set to fixed
  • Status changed from open to closed

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

Note: See TracTickets for help on using tickets.