aboutsummaryrefslogtreecommitdiffstats
path: root/src/core.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.js')
-rw-r--r--src/core.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core.js b/src/core.js
index 467895f74..edd108906 100644
--- a/src/core.js
+++ b/src/core.js
@@ -772,7 +772,7 @@ function access( elems, key, value, exec, fn, pass ) {
// Setting one attribute
if ( value !== undefined ) {
// Optionally, function values get executed if exec is true
- exec = exec && jQuery.isFunction(value);
+ exec = !pass && exec && jQuery.isFunction(value);
for ( var i = 0; i < length; i++ ) {
fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );