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:
jeresig 2010-01-06 15:08:07 -05:00
parent 84dd82eb1a
commit 600d314538
3 changed files with 72 additions and 60 deletions

View file

@ -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;