A first pass at making sure that all the setter function arguments receive the index of the element and a relevant value to work with. Fixes #5763.
This commit is contained in:
parent
84dd82eb1a
commit
600d314538
3 changed files with 72 additions and 60 deletions
|
@ -775,7 +775,7 @@ function access( elems, key, value, exec, fn, pass ) {
|
|||
exec = exec && jQuery.isFunction(value);
|
||||
|
||||
for ( var i = 0; i < length; i++ ) {
|
||||
fn( elems[i], key, exec ? value.call( elems[i], i ) : value, pass );
|
||||
fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
|
||||
}
|
||||
|
||||
return elems;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue