Side navigation
#14427 closed feature (notabug)
Opened October 08, 2013 01:45AM UTC
Closed October 08, 2013 05:54PM UTC
Last modified October 08, 2013 05:59PM UTC
Change .add() to .and()
Reported by: | me@bfred.it | 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.
Attachments (0)
Change History (3)
Changed October 08, 2013 05:51PM UTC by comment:1
Changed October 08, 2013 05:54PM UTC by comment:2
resolution: | → notabug |
---|---|
status: | new → closed |
Replying to [ticket:14427 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."
Changed October 08, 2013 05:59PM UTC by comment:3
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)
While we're at it, we could make it easy to add multiple elements:
$(this).and(that, them, others, ducks).doABarrelRoll();