jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
"url" :
typeof s.data === "string" &&
- !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") &&
+ ( s.contentType || "" )
+ .indexOf("application/x-www-form-urlencoded") === 0 &&
rjsonp.test( s.data ) && "data"
);
self = this,
off = url.indexOf(" ");
- if ( off >= 0 ) {
+ if ( off > -1 ) {
selector = jQuery.trim( url.slice( off ) );
url = url.slice( 0, off );
}
j = 0;
while ( (clazz = classes[j++]) ) {
// Remove *all* instances
- while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+ while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
cur = cur.replace( " " + clazz + " ", " " );
}
}
l = this.length;
for ( ; i < l; i++ ) {
if ( this[i].nodeType === 1 &&
- (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
return true;
}
while ( i-- ) {
option = options[ i ];
if ( (option.selected =
- jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0) ) {
+ jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1) ) {
optionSet = true;
}
}
jQuery.valHooks[ this ] = {
set: function( elem, value ) {
if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) > -1 );
}
}
};
// *... In the case of properties that might _actually_
// have dashes, we need to also store a copy of that
// unchanged property.
- if ( key.indexOf("-") !== -1 && data !== undefined ) {
+ if ( key.indexOf("-") > -1 && data !== undefined ) {
dataUser.set( this, key, value );
}
});
return;
}
- if ( type.indexOf(".") >= 0 ) {
+ if ( type.indexOf(".") > -1 ) {
// Namespaced trigger; create a regexp to match event type in handle()
namespaces = type.split(".");
type = namespaces.shift();
if ( matches[ sel ] === undefined ) {
matches[ sel ] = handleObj.needsContext ?
- jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery( sel, this ).index( cur ) > -1 :
jQuery.find( sel, this, null, [ cur ] ).length;
}
if ( matches[ sel ] ) {
// #4087 - If origin and destination elements are the same, and this is
// that element, do not do anything
- if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+ if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
continue;
}
}
return jQuery.grep( elements, function( elem ) {
- return ( indexOf.call( qualifier, elem ) >= 0 ) !== not;
+ return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
});
}