Bug Tracker

Ticket #9591 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

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
Blocking: Blocked by:


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

comment:1 Changed 4 years ago by rwaldron

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

Thanks, tagged as "needsdocs"

comment:2 Changed 4 years ago by addyosmani

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

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

Note: See TracTickets for help on using tickets.