mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Fix #10692. JSLint is dead! Long live JSHint!
Still needs this sizzle PR: https://github.com/jquery/sizzle/pull/82
This commit is contained in:
committed by
Dave Methvin
parent
d6500cc8de
commit
98386cfd77
24
src/ajax.js
24
src/ajax.js
@@ -21,21 +21,21 @@ var r20 = /%20/g,
|
||||
_load = jQuery.fn.load,
|
||||
|
||||
/* Prefilters
|
||||
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
|
||||
* 2) These are called:
|
||||
* - BEFORE asking for a transport
|
||||
* - AFTER param serialization (s.data is a string if s.processData is true)
|
||||
* 3) key is the dataType
|
||||
* 4) the catchall symbol "*" can be used
|
||||
* 5) execution will start with transport dataType and THEN continue down to "*" if needed
|
||||
*/
|
||||
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
|
||||
* 2) These are called:
|
||||
* - BEFORE asking for a transport
|
||||
* - AFTER param serialization (s.data is a string if s.processData is true)
|
||||
* 3) key is the dataType
|
||||
* 4) the catchall symbol "*" can be used
|
||||
* 5) execution will start with transport dataType and THEN continue down to "*" if needed
|
||||
*/
|
||||
prefilters = {},
|
||||
|
||||
/* Transports bindings
|
||||
* 1) key is the dataType
|
||||
* 2) the catchall symbol "*" can be used
|
||||
* 3) selection will start with transport dataType and THEN go to "*" if needed
|
||||
*/
|
||||
* 1) key is the dataType
|
||||
* 2) the catchall symbol "*" can be used
|
||||
* 3) selection will start with transport dataType and THEN go to "*" if needed
|
||||
*/
|
||||
transports = {},
|
||||
|
||||
// Document location
|
||||
|
||||
@@ -27,11 +27,11 @@ function createActiveXHR() {
|
||||
// (This is still attached to ajaxSettings for backward compatibility)
|
||||
jQuery.ajaxSettings.xhr = window.ActiveXObject ?
|
||||
/* Microsoft failed to properly
|
||||
* implement the XMLHttpRequest in IE7 (can't request local files),
|
||||
* so we use the ActiveXObject when it is available
|
||||
* Additionally XMLHttpRequest can be disabled in IE7/IE8 so
|
||||
* we need a fallback.
|
||||
*/
|
||||
* implement the XMLHttpRequest in IE7 (can't request local files),
|
||||
* so we use the ActiveXObject when it is available
|
||||
* Additionally XMLHttpRequest can be disabled in IE7/IE8 so
|
||||
* we need a fallback.
|
||||
*/
|
||||
function() {
|
||||
return !this.isLocal && createStandardXHR() || createActiveXHR();
|
||||
} :
|
||||
|
||||
@@ -185,9 +185,9 @@ jQuery.event = {
|
||||
handleObj = eventType[ j ];
|
||||
|
||||
if ( ( mappedTypes || origType === handleObj.origType ) &&
|
||||
( !handler || handler.guid === handleObj.guid ) &&
|
||||
( !namespaces || namespaces.test( handleObj.namespace ) ) &&
|
||||
( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
|
||||
( !handler || handler.guid === handleObj.guid ) &&
|
||||
( !namespaces || namespaces.test( handleObj.namespace ) ) &&
|
||||
( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
|
||||
eventType.splice( j--, 1 );
|
||||
|
||||
if ( handleObj.selector ) {
|
||||
|
||||
@@ -227,7 +227,7 @@ jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( me
|
||||
if ( win ) {
|
||||
win.scrollTo(
|
||||
!top ? val : jQuery( win ).scrollLeft(),
|
||||
top ? val : jQuery( win ).scrollTop()
|
||||
top ? val : jQuery( win ).scrollTop()
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -73,11 +73,11 @@ jQuery.fn.extend({
|
||||
},
|
||||
|
||||
is: function( selector ) {
|
||||
return !!selector && (
|
||||
return !!selector && (
|
||||
typeof selector === "string" ?
|
||||
// If this is a positional selector, check membership in the returned set
|
||||
// so $("p:first").is("p:last") won't return true for a doc with two "p".
|
||||
POS.test( selector ) ?
|
||||
POS.test( selector ) ?
|
||||
jQuery( selector, this.context ).index( this[0] ) >= 0 :
|
||||
jQuery.filter( selector, this ).length > 0 :
|
||||
this.filter( selector ).length > 0 );
|
||||
@@ -85,7 +85,7 @@ jQuery.fn.extend({
|
||||
|
||||
closest: function( selectors, context ) {
|
||||
var ret = [], i, l, cur = this[0];
|
||||
|
||||
|
||||
// Array (deprecated as of jQuery 1.7)
|
||||
if ( jQuery.isArray( selectors ) ) {
|
||||
var level = 1;
|
||||
|
||||
Reference in New Issue
Block a user