]> source.dussan.org Git - jquery.git/commitdiff
Revert "Ajax: Remove remnants of the load event alias handling"
authorOleg Gaidarenko <markelog@gmail.com>
Tue, 22 Dec 2015 12:17:35 +0000 (15:17 +0300)
committerOleg Gaidarenko <markelog@gmail.com>
Tue, 22 Dec 2015 12:17:35 +0000 (15:17 +0300)
This reverts commit 38bd5feddeca3acdd740300f370450621d4e2731.

src/ajax/load.js

index 743fe22e663111ce5db89c2b9da788d6742014f7..4ba370e2169229586f2c2cb154da2d165a0a7be7 100644 (file)
@@ -4,14 +4,23 @@ define( [
        "../ajax",
        "../traversing",
        "../manipulation",
-       "../selector"
+       "../selector",
+       // Optional event/alias dependency
+       "../event/alias"
 ], function( jQuery ) {
 
+// Keep a copy of the old load method
+var _load = jQuery.fn.load;
+
 /**
  * Load a url into a page
  */
 jQuery.fn.load = function( url, params, callback ) {
-       var selector, response, type,
+       if ( typeof url !== "string" && _load ) {
+               return _load.apply( this, arguments );
+       }
+
+       var selector, type, response,
                self = this,
                off = url.indexOf( " " );