5 ], function( jQuery, toType, isFunction ) {
9 // Multifunctional method to get and set values of a collection
10 // The value/s can optionally be executed if it's a function
11 var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
17 if ( toType( key ) === "object" ) {
20 access( elems, fn, i, key[ i ], true, emptyGet, raw );
24 } else if ( value !== undefined ) {
27 if ( !isFunction( value ) ) {
33 // Bulk operations run against the entire set
35 fn.call( elems, value );
38 // ...except when executing function values
41 fn = function( elem, key, value ) {
42 return bulk.call( jQuery( elem ), value );
48 for ( ; i < len; i++ ) {
50 elems[ i ], key, raw ?
52 value.call( elems[ i ], i, fn( elems[ i ], key ) )
64 return fn.call( elems );
67 return len ? fn( elems[ 0 ], key ) : emptyGet;