diff options
author | Jason Bedard <github@jbedard.ca> | 2013-05-02 18:45:02 -0700 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2013-05-09 14:26:13 -0400 |
commit | c9267ab078ad223eceb381fb45ab06a86baccfb0 (patch) | |
tree | d430c4f8aea4d9aaddf899ca23c5c08c34afd213 /src/attributes.js | |
parent | 47f56f1612b907ec9eaa7111c7af66d335279fa2 (diff) | |
download | jquery-c9267ab078ad223eceb381fb45ab06a86baccfb0.tar.gz jquery-c9267ab078ad223eceb381fb45ab06a86baccfb0.zip |
Only call jQuery(this) when needed. Close gh-1260.
Diffstat (limited to 'src/attributes.js')
-rw-r--r-- | src/attributes.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/attributes.js b/src/attributes.js index 6cefd52ac..ace917e91 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -182,15 +182,14 @@ jQuery.fn.extend({ isFunction = jQuery.isFunction( value ); return this.each(function( i ) { - var val, - self = jQuery(this); + var val; if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { - val = value.call( this, i, self.val() ); + val = value.call( this, i, jQuery( this ).val() ); } else { val = value; } |