Modify ↓
Ticket #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 |
| Blocking: | Blocked by: |
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.
Change History
comment:1 Changed 2 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
comment:2 Changed 2 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/
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Thanks, tagged as "needsdocs"