Opened 13 years ago
Closed 12 years ago
#6238 closed enhancement (wontfix)
All "each" style callbacks should pass consistent arguments.
Reported by: | cowboy | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | effects | Version: | 1.4.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
logs what you'd expect. $('*').each(function( i, elem ){ console.log( i, elem ); });
hey, it's an undefined party and everyone's invited! $('*').fadeOut(function( i, elem ){ console.log( i, elem ); });
This metaphor is used in many, many places, and it should be consistent across jQuery.
In addition, I'd like to see a third argument passed, which is a reference to the initial collection being operated on - is that even possible?
Change History (6)
comment:1 Changed 13 years ago by
comment:3 Changed 13 years ago by
Component: | unfiled → core |
---|
comment:4 Changed 12 years ago by
need: | Review → Patch |
---|---|
Priority: | → undecided |
I agree that this behavior should be consistent. Moving to patch.
comment:5 Changed 12 years ago by
Milestone: | 1.4.3 |
---|---|
Priority: | undecided → low |
Status: | new → open |
Type: | bug → enhancement |
Version: | 1.4.2 → 1.4.3 |
comment:6 Changed 12 years ago by
Component: | core → effects |
---|---|
Milestone: | → 1.next |
Resolution: | → wontfix |
Status: | open → closed |
I'm not completely convinced that it makes sense in this case - as it's not a synchronous loop - it's more akin to attaching an event that is fired when fadeOut is complete (and I don't think that events really make sense having this sort of thing).
I meant: