#14427 closed feature (notabug)
Change .add() to .and()
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The "add" name is confusing. Does it add to the original element list? Does it add it as a children?
$(this).and(that).doSomething(); would be more readable.
Change History (3)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
Replying to me@…:
The "add" name is confusing. Does it add to the original element list? Does it add it as a children?
It does what the docs say it does: "Add elements to the set of matched elements."
comment:3 Changed 10 years ago by
So did .andSelf() when they changed it to .addBack() .and() would be easier to read.
Also "Add elements to the set of matched elements." is confusing too. Does it change the original object? (I know the answer but it isn't clear to the uninitiated)
Note: See
TracTickets for help on using
tickets.
While we're at it, we could make it easy to add multiple elements: $(this).and(that, them, others, ducks).doABarrelRoll();