diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2015-08-16 09:59:58 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-09-07 20:03:50 +0300 |
commit | 10fdad742a2a6aa9f0e00b3e04fc5264797c53c7 (patch) | |
tree | 6b6d7b1375ff88f4bebbfa0703f7b595eb485df9 /src/ajax/load.js | |
parent | 7aa46e0df8a673e6b00550bbbbed21eed50108b7 (diff) | |
download | jquery-10fdad742a2a6aa9f0e00b3e04fc5264797c53c7.tar.gz jquery-10fdad742a2a6aa9f0e00b3e04fc5264797c53c7.zip |
Build: Update jscs and lint files
Fixes gh-2056
Diffstat (limited to 'src/ajax/load.js')
-rw-r--r-- | src/ajax/load.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ajax/load.js b/src/ajax/load.js index 8326e9287..82f0cf308 100644 --- a/src/ajax/load.js +++ b/src/ajax/load.js @@ -1,4 +1,4 @@ -define([ +define( [ "../core", "../core/parseHTML", "../ajax", @@ -13,7 +13,7 @@ define([ jQuery.fn.load = function( url, params, callback ) { var selector, type, response, self = this, - off = url.indexOf(" "); + off = url.indexOf( " " ); if ( off > -1 ) { selector = jQuery.trim( url.slice( off ) ); @@ -34,7 +34,7 @@ jQuery.fn.load = function( url, params, callback ) { // If we have elements to modify, make the request if ( self.length > 0 ) { - jQuery.ajax({ + jQuery.ajax( { url: url, // If "type" variable is undefined, then "GET" method will be used. @@ -43,7 +43,7 @@ jQuery.fn.load = function( url, params, callback ) { type: type || "GET", dataType: "html", data: params - }).done(function( responseText ) { + } ).done( function( responseText ) { // Save response for use in complete callback response = arguments; @@ -52,7 +52,7 @@ jQuery.fn.load = function( url, params, callback ) { // If a selector was specified, locate the right elements in a dummy div // Exclude scripts to avoid IE 'Permission Denied' errors - jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : + jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : // Otherwise use the full result responseText ); @@ -60,14 +60,14 @@ jQuery.fn.load = function( url, params, callback ) { // If the request succeeds, this function gets "data", "status", "jqXHR" // but they are ignored because response was set above. // If it fails, this function gets "jqXHR", "status", "error" - }).always( callback && function( jqXHR, status ) { + } ).always( callback && function( jqXHR, status ) { self.each( function() { callback.apply( self, response || [ jqXHR.responseText, status, jqXHR ] ); - }); - }); + } ); + } ); } return this; }; -}); +} ); |