]> source.dussan.org Git - jquery.git/commitdiff
Only call jQuery(this) when needed. Close gh-1260.
authorJason Bedard <github@jbedard.ca>
Fri, 3 May 2013 01:45:02 +0000 (18:45 -0700)
committerDave Methvin <dave.methvin@gmail.com>
Thu, 9 May 2013 18:26:13 +0000 (14:26 -0400)
.mailmap
AUTHORS.txt
src/attributes.js

index eeafcc6fad31334844eabfe5c7c115ec1346f85d..f514768295e2f352f518f254a6b44a13021b78fc 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -33,6 +33,7 @@ Isaac Z. Schlueter <i@izs.me>
 Ismail Khair <ismail.khair@gmail.com>
 James Burke <jrburke@gmail.com>
 James Padolsey <cla@padolsey.net> <jamespadolsey@gmail.com>
+Jason Bedard <jason+jquery@jbedard.ca> <github@jbedard.ca>
 Jay Merrifield <fracmak@gmail.com>
 Jay Merrifield <fracmak@gmail.com> <jmerrifiel@gannett.com>
 Jean Boussier <jean.boussier@gmail.com>
index 9ce13edf2978aaf3d5cab4d08a4440b0ff2119b7..580570fb23a5a3702accc6ca66bd7562516ded8c 100644 (file)
@@ -167,3 +167,4 @@ Michał Gołębiowski <m.goleb@gmail.com>
 Steven Benner <admin@stevenbenner.com>
 Li Xudong <istonelee@gmail.com>
 Renato Oliveira dos Santos <ros3@cin.ufpe.br>
+Jason Bedard <jason+jquery@jbedard.ca>
index 6cefd52ac84c3159d8e7953fe9f8c24a8b3a12d3..ace917e91e25ca0ad02f7a07f5b3173e6634890a 100644 (file)
@@ -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;
                        }