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 comment:1
| component: | unfiled → core | 
|---|---|
| keywords: | → needsdocs | 
| priority: | undecided → low | 
| status: | new → open | 
Changed June 17, 2011 07:12AM UTC by comment:2
| cc: | → kwedberg | 
|---|---|
| keywords: | needsdocs → neededdocs | 
| resolution: | → fixed | 
| status: | open → closed | 
Our docs have been updated accordingly: http://api.jquery.com/add/
Thanks, tagged as "needsdocs"