]> source.dussan.org Git - jquery.git/commitdiff
Ajax: remove use of jQuery#each second argument
authorOleg Gaidarenko <markelog@gmail.com>
Tue, 17 Feb 2015 07:05:25 +0000 (10:05 +0300)
committerOleg Gaidarenko <markelog@gmail.com>
Thu, 19 Feb 2015 08:31:39 +0000 (11:31 +0300)
(cherry-picked from a4715f4216ace92fba6991106053415e66289686)
Ref gh-2090

src/ajax/load.js

index d9c4550fb7761e5114c52e08ef9d2838115d3383..d28277bdef39aef9066a56de06f7b220c01e9704 100644 (file)
@@ -70,7 +70,9 @@ jQuery.fn.load = function( url, params, callback ) {
                // but they are ignored because response was set above.
                // If it fails, this function gets "jqXHR", "status", "error"
                }).always( callback && function( jqXHR, status ) {
-                       self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+                       self.each( function() {
+                               callback.apply( self, response || [ jqXHR.responseText, status, jqXHR ] );
+                       });
                });
        }