#11154 closed bug (wontfix)
.each() callback.
Reported by: | brunolazzaro | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
It would be great if .each() had a callback function that fires when all nodes have been traversed.
Something like:
$('div').each(fn, callback)
$('a').each(function(){ code here for manipulating the links }, function(){ i'm done, fire this function. })
Change History (2)
comment:1 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
I'd also like to point out that .each()
is synchronous, so this:
$('a').each(function( index, element ) { console.log( "Index", index ); }); console.log( "I'm Done" );
Works just as well...
Note: See
TracTickets for help on using
tickets.
Feature creep. Can easily be inlined: http://jsfiddle.net/rwaldron/p4Yp4/