remove trailing spaces
This commit is contained in:
parent
e06da1724c
commit
f8ef75eb91
11 changed files with 77 additions and 77 deletions
|
@ -95,7 +95,7 @@ jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".sp
|
||||||
var jsc = now();
|
var jsc = now();
|
||||||
|
|
||||||
jQuery.extend({
|
jQuery.extend({
|
||||||
|
|
||||||
get: function( url, data, callback, type ) {
|
get: function( url, data, callback, type ) {
|
||||||
// shift arguments if data argument was ommited
|
// shift arguments if data argument was ommited
|
||||||
if ( jQuery.isFunction( data ) ) {
|
if ( jQuery.isFunction( data ) ) {
|
||||||
|
@ -484,7 +484,7 @@ jQuery.extend({
|
||||||
|
|
||||||
if ( xml && data.documentElement.tagName == "parsererror" )
|
if ( xml && data.documentElement.tagName == "parsererror" )
|
||||||
throw "parsererror";
|
throw "parsererror";
|
||||||
|
|
||||||
// Allow a pre-filtering function to sanitize the response
|
// Allow a pre-filtering function to sanitize the response
|
||||||
// s != null is checked to keep backwards compatibility
|
// s != null is checked to keep backwards compatibility
|
||||||
if( s && s.dataFilter )
|
if( s && s.dataFilter )
|
||||||
|
@ -501,7 +501,7 @@ jQuery.extend({
|
||||||
if ( type == "json" )
|
if ( type == "json" )
|
||||||
data = window["eval"]("(" + data + ")");
|
data = window["eval"]("(" + data + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ jQuery.fn.extend({
|
||||||
if ( elem ) {
|
if ( elem ) {
|
||||||
if( jQuery.nodeName( elem, 'option' ) )
|
if( jQuery.nodeName( elem, 'option' ) )
|
||||||
return (elem.attributes.value || {}).specified ? elem.value : elem.text;
|
return (elem.attributes.value || {}).specified ? elem.value : elem.text;
|
||||||
|
|
||||||
// We need to handle select boxes special
|
// We need to handle select boxes special
|
||||||
if ( jQuery.nodeName( elem, "select" ) ) {
|
if ( jQuery.nodeName( elem, "select" ) ) {
|
||||||
var index = elem.selectedIndex,
|
var index = elem.selectedIndex,
|
||||||
|
@ -75,7 +75,7 @@ jQuery.fn.extend({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Everything else, we just grab the value
|
// Everything else, we just grab the value
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
var
|
var
|
||||||
// Will speed up references to window, and allows munging its name.
|
// Will speed up references to window, and allows munging its name.
|
||||||
window = this,
|
window = this,
|
||||||
// Will speed up references to undefined, and allows munging its name.
|
// Will speed up references to undefined, and allows munging its name.
|
||||||
|
@ -233,7 +233,7 @@ jQuery.extend = jQuery.fn.extend = function() {
|
||||||
|
|
||||||
// Recurse if we're merging object values
|
// Recurse if we're merging object values
|
||||||
if ( deep && copy && typeof copy === "object" && !copy.nodeType )
|
if ( deep && copy && typeof copy === "object" && !copy.nodeType )
|
||||||
target[ name ] = jQuery.extend( deep,
|
target[ name ] = jQuery.extend( deep,
|
||||||
// Never move original objects, clone them
|
// Never move original objects, clone them
|
||||||
src || ( copy.length != null ? [ ] : { } )
|
src || ( copy.length != null ? [ ] : { } )
|
||||||
, copy );
|
, copy );
|
||||||
|
|
14
src/data.js
14
src/data.js
|
@ -70,16 +70,16 @@ jQuery.extend({
|
||||||
},
|
},
|
||||||
queue: function( elem, type, data ) {
|
queue: function( elem, type, data ) {
|
||||||
if ( elem ){
|
if ( elem ){
|
||||||
|
|
||||||
type = (type || "fx") + "queue";
|
type = (type || "fx") + "queue";
|
||||||
|
|
||||||
var q = jQuery.data( elem, type );
|
var q = jQuery.data( elem, type );
|
||||||
|
|
||||||
if ( !q || jQuery.isArray(data) )
|
if ( !q || jQuery.isArray(data) )
|
||||||
q = jQuery.data( elem, type, jQuery.makeArray(data) );
|
q = jQuery.data( elem, type, jQuery.makeArray(data) );
|
||||||
else if( data )
|
else if( data )
|
||||||
q.push( data );
|
q.push( data );
|
||||||
|
|
||||||
}
|
}
|
||||||
return q;
|
return q;
|
||||||
},
|
},
|
||||||
|
@ -87,10 +87,10 @@ jQuery.extend({
|
||||||
dequeue: function( elem, type ){
|
dequeue: function( elem, type ){
|
||||||
var queue = jQuery.queue( elem, type ),
|
var queue = jQuery.queue( elem, type ),
|
||||||
fn = queue.shift();
|
fn = queue.shift();
|
||||||
|
|
||||||
if( !type || type === "fx" )
|
if( !type || type === "fx" )
|
||||||
fn = queue[0];
|
fn = queue[0];
|
||||||
|
|
||||||
if( fn !== undefined )
|
if( fn !== undefined )
|
||||||
fn.call(elem);
|
fn.call(elem);
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ jQuery.fn.extend({
|
||||||
|
|
||||||
return this.each(function(){
|
return this.each(function(){
|
||||||
var queue = jQuery.queue( this, type, data );
|
var queue = jQuery.queue( this, type, data );
|
||||||
|
|
||||||
if( type == "fx" && queue.length == 1 )
|
if( type == "fx" && queue.length == 1 )
|
||||||
queue[0].call(this);
|
queue[0].call(this);
|
||||||
});
|
});
|
||||||
|
|
|
@ -16,7 +16,7 @@ jQuery.each([ "Height", "Width" ], function(i, name){
|
||||||
jQuery.css( this[0], type, false, margin ? "margin" : "border" ) :
|
jQuery.css( this[0], type, false, margin ? "margin" : "border" ) :
|
||||||
null;
|
null;
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery.fn[ type ] = function( size ) {
|
jQuery.fn[ type ] = function( size ) {
|
||||||
// Get window width or height
|
// Get window width or height
|
||||||
return this[0] == window ?
|
return this[0] == window ?
|
||||||
|
|
44
src/event.js
44
src/event.js
|
@ -56,7 +56,7 @@ jQuery.event = {
|
||||||
|
|
||||||
// Get the current list of functions bound to this event
|
// Get the current list of functions bound to this event
|
||||||
var handlers = events[type];
|
var handlers = events[type];
|
||||||
|
|
||||||
if ( jQuery.event.specialAll[type] )
|
if ( jQuery.event.specialAll[type] )
|
||||||
jQuery.event.specialAll[type].setup.call(elem, data, namespaces);
|
jQuery.event.specialAll[type].setup.call(elem, data, namespaces);
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ jQuery.event = {
|
||||||
// Handle the removal of namespaced events
|
// Handle the removal of namespaced events
|
||||||
if ( namespace.test(events[type][handle].type) )
|
if ( namespace.test(events[type][handle].type) )
|
||||||
delete events[type][handle];
|
delete events[type][handle];
|
||||||
|
|
||||||
if ( jQuery.event.specialAll[type] )
|
if ( jQuery.event.specialAll[type] )
|
||||||
jQuery.event.specialAll[type].teardown.call(elem, namespaces);
|
jQuery.event.specialAll[type].teardown.call(elem, namespaces);
|
||||||
|
|
||||||
|
@ -196,11 +196,11 @@ jQuery.event = {
|
||||||
// don't do events on text and comment nodes
|
// don't do events on text and comment nodes
|
||||||
if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
|
if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
||||||
// Clean up in case it is reused
|
// Clean up in case it is reused
|
||||||
event.result = undefined;
|
event.result = undefined;
|
||||||
event.target = elem;
|
event.target = elem;
|
||||||
|
|
||||||
// Clone the incoming data, if any
|
// Clone the incoming data, if any
|
||||||
data = jQuery.makeArray(data);
|
data = jQuery.makeArray(data);
|
||||||
data.unshift( event );
|
data.unshift( event );
|
||||||
|
@ -241,14 +241,14 @@ jQuery.event = {
|
||||||
|
|
||||||
event = arguments[0] = jQuery.event.fix( event || window.event );
|
event = arguments[0] = jQuery.event.fix( event || window.event );
|
||||||
event.currentTarget = this;
|
event.currentTarget = this;
|
||||||
|
|
||||||
// Namespaced event handlers
|
// Namespaced event handlers
|
||||||
var namespaces = event.type.split(".");
|
var namespaces = event.type.split(".");
|
||||||
event.type = namespaces.shift();
|
event.type = namespaces.shift();
|
||||||
|
|
||||||
// Cache this now, all = true means, any handler
|
// Cache this now, all = true means, any handler
|
||||||
all = !namespaces.length && !event.exclusive;
|
all = !namespaces.length && !event.exclusive;
|
||||||
|
|
||||||
var namespace = new RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
|
var namespace = new RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
|
||||||
|
|
||||||
handlers = ( jQuery.data(this, "events") || {} )[event.type];
|
handlers = ( jQuery.data(this, "events") || {} )[event.type];
|
||||||
|
@ -346,7 +346,7 @@ jQuery.event = {
|
||||||
teardown: function() {}
|
teardown: function() {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
specialAll: {
|
specialAll: {
|
||||||
live: {
|
live: {
|
||||||
setup: function( selector, namespaces ){
|
setup: function( selector, namespaces ){
|
||||||
|
@ -355,12 +355,12 @@ jQuery.event = {
|
||||||
teardown: function( namespaces ){
|
teardown: function( namespaces ){
|
||||||
if ( namespaces.length ) {
|
if ( namespaces.length ) {
|
||||||
var remove = 0, name = new RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
|
var remove = 0, name = new RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
|
||||||
|
|
||||||
jQuery.each( (jQuery.data(this, "events").live || {}), function(){
|
jQuery.each( (jQuery.data(this, "events").live || {}), function(){
|
||||||
if ( name.test(this.type) )
|
if ( name.test(this.type) )
|
||||||
remove++;
|
remove++;
|
||||||
});
|
});
|
||||||
|
|
||||||
if ( remove < 1 )
|
if ( remove < 1 )
|
||||||
jQuery.event.remove( this, namespaces[0], liveHandler );
|
jQuery.event.remove( this, namespaces[0], liveHandler );
|
||||||
}
|
}
|
||||||
|
@ -373,7 +373,7 @@ jQuery.Event = function( src ){
|
||||||
// Allow instantiation without the 'new' keyword
|
// Allow instantiation without the 'new' keyword
|
||||||
if( !this.preventDefault )
|
if( !this.preventDefault )
|
||||||
return new jQuery.Event(src);
|
return new jQuery.Event(src);
|
||||||
|
|
||||||
// Event object
|
// Event object
|
||||||
if( src && src.type ){
|
if( src && src.type ){
|
||||||
this.originalEvent = src;
|
this.originalEvent = src;
|
||||||
|
@ -385,7 +385,7 @@ jQuery.Event = function( src ){
|
||||||
// timeStamp is buggy for some events on Firefox(#3843)
|
// timeStamp is buggy for some events on Firefox(#3843)
|
||||||
// So we won't rely on the native value
|
// So we won't rely on the native value
|
||||||
this.timeStamp = now();
|
this.timeStamp = now();
|
||||||
|
|
||||||
// Mark it as fixed
|
// Mark it as fixed
|
||||||
this[expando] = true;
|
this[expando] = true;
|
||||||
};
|
};
|
||||||
|
@ -441,7 +441,7 @@ var withinElement = function(event) {
|
||||||
while ( parent && parent != this )
|
while ( parent && parent != this )
|
||||||
try { parent = parent.parentNode; }
|
try { parent = parent.parentNode; }
|
||||||
catch(e) { parent = this; }
|
catch(e) { parent = this; }
|
||||||
|
|
||||||
if( parent != this ){
|
if( parent != this ){
|
||||||
// set the correct event type
|
// set the correct event type
|
||||||
event.type = event.data;
|
event.type = event.data;
|
||||||
|
@ -449,9 +449,9 @@ var withinElement = function(event) {
|
||||||
jQuery.event.handle.apply( this, arguments );
|
jQuery.event.handle.apply( this, arguments );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery.each({
|
jQuery.each({
|
||||||
mouseover: 'mouseenter',
|
mouseover: 'mouseenter',
|
||||||
mouseout: 'mouseleave'
|
mouseout: 'mouseleave'
|
||||||
}, function( orig, fix ){
|
}, function( orig, fix ){
|
||||||
jQuery.event.special[ fix ] = {
|
jQuery.event.special[ fix ] = {
|
||||||
|
@ -461,7 +461,7 @@ jQuery.each({
|
||||||
teardown: function(){
|
teardown: function(){
|
||||||
jQuery.event.remove( this, orig, withinElement );
|
jQuery.event.remove( this, orig, withinElement );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery.fn.extend({
|
jQuery.fn.extend({
|
||||||
|
@ -500,7 +500,7 @@ jQuery.fn.extend({
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
jQuery.event.trigger( event, data, this[0] );
|
jQuery.event.trigger( event, data, this[0] );
|
||||||
return event.result;
|
return event.result;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
toggle: function( fn ) {
|
toggle: function( fn ) {
|
||||||
|
@ -543,7 +543,7 @@ jQuery.fn.extend({
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
live: function( type, fn ){
|
live: function( type, fn ){
|
||||||
var proxy = jQuery.event.proxy( fn );
|
var proxy = jQuery.event.proxy( fn );
|
||||||
proxy.guid += this.selector + type;
|
proxy.guid += this.selector + type;
|
||||||
|
@ -552,7 +552,7 @@ jQuery.fn.extend({
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
die: function( type, fn ){
|
die: function( type, fn ){
|
||||||
jQuery( this.context ).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null );
|
jQuery( this.context ).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null );
|
||||||
return this;
|
return this;
|
||||||
|
@ -575,7 +575,7 @@ function liveHandler( event ){
|
||||||
elems.sort(function(a,b) {
|
elems.sort(function(a,b) {
|
||||||
return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest");
|
return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest");
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery.each(elems, function(){
|
jQuery.each(elems, function(){
|
||||||
event.currentTarget = this.elem;
|
event.currentTarget = this.elem;
|
||||||
if ( this.fn.call(this.elem, event, this.fn.data) === false )
|
if ( this.fn.call(this.elem, event, this.fn.data) === false )
|
||||||
|
@ -680,9 +680,9 @@ jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
|
||||||
// More info:
|
// More info:
|
||||||
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
|
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
|
||||||
// - https://bugzilla.mozilla.org/show_bug.cgi?id=252542
|
// - https://bugzilla.mozilla.org/show_bug.cgi?id=252542
|
||||||
jQuery( window ).bind( 'unload', function(){
|
jQuery( window ).bind( 'unload', function(){
|
||||||
for ( var id in jQuery.cache )
|
for ( var id in jQuery.cache )
|
||||||
// Skip the window
|
// Skip the window
|
||||||
if ( id != 1 && jQuery.cache[ id ].handle )
|
if ( id != 1 && jQuery.cache[ id ].handle )
|
||||||
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
|
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
|
||||||
});
|
});
|
||||||
|
|
22
src/fx.js
22
src/fx.js
|
@ -24,26 +24,26 @@ jQuery.fn.extend({
|
||||||
} else {
|
} else {
|
||||||
for ( var i = 0, l = this.length; i < l; i++ ){
|
for ( var i = 0, l = this.length; i < l; i++ ){
|
||||||
var old = jQuery.data(this[i], "olddisplay");
|
var old = jQuery.data(this[i], "olddisplay");
|
||||||
|
|
||||||
this[i].style.display = old || "";
|
this[i].style.display = old || "";
|
||||||
|
|
||||||
if ( jQuery.css(this[i], "display") === "none" ) {
|
if ( jQuery.css(this[i], "display") === "none" ) {
|
||||||
var tagName = this[i].tagName, display;
|
var tagName = this[i].tagName, display;
|
||||||
|
|
||||||
if ( elemdisplay[ tagName ] ) {
|
if ( elemdisplay[ tagName ] ) {
|
||||||
display = elemdisplay[ tagName ];
|
display = elemdisplay[ tagName ];
|
||||||
} else {
|
} else {
|
||||||
var elem = jQuery("<" + tagName + " />").appendTo("body");
|
var elem = jQuery("<" + tagName + " />").appendTo("body");
|
||||||
|
|
||||||
display = elem.css("display");
|
display = elem.css("display");
|
||||||
if ( display === "none" )
|
if ( display === "none" )
|
||||||
display = "block";
|
display = "block";
|
||||||
|
|
||||||
elem.remove();
|
elem.remove();
|
||||||
|
|
||||||
elemdisplay[ tagName ] = display;
|
elemdisplay[ tagName ] = display;
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery.data(this[i], "olddisplay", display);
|
jQuery.data(this[i], "olddisplay", display);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ jQuery.fn.extend({
|
||||||
for ( var i = 0, l = this.length; i < l; i++ ){
|
for ( var i = 0, l = this.length; i < l; i++ ){
|
||||||
this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
|
this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -103,11 +103,11 @@ jQuery.fn.extend({
|
||||||
var optall = jQuery.speed(speed, easing, callback);
|
var optall = jQuery.speed(speed, easing, callback);
|
||||||
|
|
||||||
return this[ optall.queue === false ? "each" : "queue" ](function(){
|
return this[ optall.queue === false ? "each" : "queue" ](function(){
|
||||||
|
|
||||||
var opt = jQuery.extend({}, optall), p,
|
var opt = jQuery.extend({}, optall), p,
|
||||||
hidden = this.nodeType == 1 && jQuery(this).is(":hidden"),
|
hidden = this.nodeType == 1 && jQuery(this).is(":hidden"),
|
||||||
self = this;
|
self = this;
|
||||||
|
|
||||||
for ( p in prop ) {
|
for ( p in prop ) {
|
||||||
if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
|
if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
|
||||||
return opt.complete.call(this);
|
return opt.complete.call(this);
|
||||||
|
@ -362,7 +362,7 @@ jQuery.fx.prototype = {
|
||||||
if ( this.options.hide || this.options.show )
|
if ( this.options.hide || this.options.show )
|
||||||
for ( var p in this.options.curAnim )
|
for ( var p in this.options.curAnim )
|
||||||
jQuery.style(this.elem, p, this.options.orig[p]);
|
jQuery.style(this.elem, p, this.options.orig[p]);
|
||||||
|
|
||||||
// Execute the complete function
|
// Execute the complete function
|
||||||
this.options.complete.call( this.elem );
|
this.options.complete.call( this.elem );
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,13 +146,13 @@ jQuery.fn.extend({
|
||||||
for ( var i = 0, l = this.length; i < l; i++ )
|
for ( var i = 0, l = this.length; i < l; i++ )
|
||||||
callback.call( root(this[i], first), this.length > 1 || i > 0 ?
|
callback.call( root(this[i], first), this.length > 1 || i > 0 ?
|
||||||
fragment.cloneNode(true) : fragment );
|
fragment.cloneNode(true) : fragment );
|
||||||
|
|
||||||
if ( scripts )
|
if ( scripts )
|
||||||
jQuery.each( scripts, evalScript );
|
jQuery.each( scripts, evalScript );
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
function root( elem, cur ) {
|
function root( elem, cur ) {
|
||||||
return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ?
|
return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ?
|
||||||
(elem.getElementsByTagName("tbody")[0] ||
|
(elem.getElementsByTagName("tbody")[0] ||
|
||||||
|
@ -306,7 +306,7 @@ jQuery.extend({
|
||||||
// IE completely kills leading whitespace when innerHTML is used
|
// IE completely kills leading whitespace when innerHTML is used
|
||||||
if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) )
|
if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) )
|
||||||
div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
|
div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
|
||||||
|
|
||||||
elem = jQuery.makeArray( div.childNodes );
|
elem = jQuery.makeArray( div.childNodes );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ jQuery.extend({
|
||||||
fragment.appendChild( ret[i] );
|
fragment.appendChild( ret[i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return scripts;
|
return scripts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ if ( "getBoundingClientRect" in document.documentElement )
|
||||||
left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
|
left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
|
||||||
return { top: top, left: left };
|
return { top: top, left: left };
|
||||||
};
|
};
|
||||||
else
|
else
|
||||||
jQuery.fn.offset = function() {
|
jQuery.fn.offset = function() {
|
||||||
var elem = this[0];
|
var elem = this[0];
|
||||||
if ( !elem ) return null;
|
if ( !elem ) return null;
|
||||||
|
@ -104,7 +104,7 @@ jQuery.fn.extend({
|
||||||
parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset();
|
parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset();
|
||||||
|
|
||||||
// Subtract element margins
|
// Subtract element margins
|
||||||
// note: when an element has margin: auto the offsetLeft and marginLeft
|
// note: when an element has margin: auto the offsetLeft and marginLeft
|
||||||
// are the same in Safari causing offset.left to incorrectly be 0
|
// are the same in Safari causing offset.left to incorrectly be 0
|
||||||
offset.top -= parseFloat( jQuery.curCSS(elem, 'marginTop', true), 10 ) || 0;
|
offset.top -= parseFloat( jQuery.curCSS(elem, 'marginTop', true), 10 ) || 0;
|
||||||
offset.left -= parseFloat( jQuery.curCSS(elem, 'marginLeft', true), 10 ) || 0;
|
offset.left -= parseFloat( jQuery.curCSS(elem, 'marginLeft', true), 10 ) || 0;
|
||||||
|
@ -134,7 +134,7 @@ jQuery.fn.extend({
|
||||||
// Create scrollLeft and scrollTop methods
|
// Create scrollLeft and scrollTop methods
|
||||||
jQuery.each( ['Left', 'Top'], function(i, name) {
|
jQuery.each( ['Left', 'Top'], function(i, name) {
|
||||||
var method = 'scroll' + name;
|
var method = 'scroll' + name;
|
||||||
|
|
||||||
jQuery.fn[ method ] = function(val) {
|
jQuery.fn[ method ] = function(val) {
|
||||||
if ( !this[0] ) return null;
|
if ( !this[0] ) return null;
|
||||||
|
|
||||||
|
|
|
@ -17,19 +17,19 @@ var Sizzle = function(selector, context, results, seed) {
|
||||||
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
|
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !selector || typeof selector !== "string" ) {
|
if ( !selector || typeof selector !== "string" ) {
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parts = [], m, set, checkSet, check, mode, extra, prune = true, contextXML = isXML(context);
|
var parts = [], m, set, checkSet, check, mode, extra, prune = true, contextXML = isXML(context);
|
||||||
|
|
||||||
// Reset the position of the chunker regexp (start from head)
|
// Reset the position of the chunker regexp (start from head)
|
||||||
chunker.lastIndex = 0;
|
chunker.lastIndex = 0;
|
||||||
|
|
||||||
while ( (m = chunker.exec(selector)) !== null ) {
|
while ( (m = chunker.exec(selector)) !== null ) {
|
||||||
parts.push( m[1] );
|
parts.push( m[1] );
|
||||||
|
|
||||||
if ( m[2] ) {
|
if ( m[2] ) {
|
||||||
extra = RegExp.rightContext;
|
extra = RegExp.rightContext;
|
||||||
break;
|
break;
|
||||||
|
@ -158,7 +158,7 @@ Sizzle.find = function(expr, context, isXML){
|
||||||
|
|
||||||
for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
|
for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
|
||||||
var type = Expr.order[i], match;
|
var type = Expr.order[i], match;
|
||||||
|
|
||||||
if ( (match = Expr.match[ type ].exec( expr )) ) {
|
if ( (match = Expr.match[ type ].exec( expr )) ) {
|
||||||
var left = RegExp.leftContext;
|
var left = RegExp.leftContext;
|
||||||
|
|
||||||
|
@ -420,7 +420,7 @@ var Expr = Sizzle.selectors = {
|
||||||
},
|
},
|
||||||
ATTR: function(match, curLoop, inplace, result, not, isXML){
|
ATTR: function(match, curLoop, inplace, result, not, isXML){
|
||||||
var name = match[1].replace(/\\/g, "");
|
var name = match[1].replace(/\\/g, "");
|
||||||
|
|
||||||
if ( !isXML && Expr.attrMap[name] ) {
|
if ( !isXML && Expr.attrMap[name] ) {
|
||||||
match[1] = Expr.attrMap[name];
|
match[1] = Expr.attrMap[name];
|
||||||
}
|
}
|
||||||
|
@ -446,7 +446,7 @@ var Expr = Sizzle.selectors = {
|
||||||
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
|
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return match;
|
return match;
|
||||||
},
|
},
|
||||||
POS: function(match){
|
POS: function(match){
|
||||||
|
@ -580,20 +580,20 @@ var Expr = Sizzle.selectors = {
|
||||||
if ( first == 1 && last == 0 ) {
|
if ( first == 1 && last == 0 ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var doneName = match[0],
|
var doneName = match[0],
|
||||||
parent = elem.parentNode;
|
parent = elem.parentNode;
|
||||||
|
|
||||||
if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
|
if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
|
||||||
var count = 0;
|
var count = 0;
|
||||||
for ( node = parent.firstChild; node; node = node.nextSibling ) {
|
for ( node = parent.firstChild; node; node = node.nextSibling ) {
|
||||||
if ( node.nodeType === 1 ) {
|
if ( node.nodeType === 1 ) {
|
||||||
node.nodeIndex = ++count;
|
node.nodeIndex = ++count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parent.sizcache = doneName;
|
parent.sizcache = doneName;
|
||||||
}
|
}
|
||||||
|
|
||||||
var diff = elem.nodeIndex - last;
|
var diff = elem.nodeIndex - last;
|
||||||
if ( first == 0 ) {
|
if ( first == 0 ) {
|
||||||
return diff == 0;
|
return diff == 0;
|
||||||
|
@ -666,7 +666,7 @@ var makeArray = function(array, results) {
|
||||||
results.push.apply( results, array );
|
results.push.apply( results, array );
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
return array;
|
return array;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@ if ( document.querySelectorAll ) (function(){
|
||||||
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
|
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sizzle = function(query, context, extra, seed){
|
Sizzle = function(query, context, extra, seed){
|
||||||
context = context || document;
|
context = context || document;
|
||||||
|
|
||||||
|
@ -822,7 +822,7 @@ if ( document.querySelectorAll ) (function(){
|
||||||
return makeArray( context.querySelectorAll(query), extra );
|
return makeArray( context.querySelectorAll(query), extra );
|
||||||
} catch(e){}
|
} catch(e){}
|
||||||
}
|
}
|
||||||
|
|
||||||
return oldSizzle(query, context, extra, seed);
|
return oldSizzle(query, context, extra, seed);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,27 +21,27 @@
|
||||||
jQuery.support = {
|
jQuery.support = {
|
||||||
// IE strips leading whitespace when .innerHTML is used
|
// IE strips leading whitespace when .innerHTML is used
|
||||||
leadingWhitespace: div.firstChild.nodeType == 3,
|
leadingWhitespace: div.firstChild.nodeType == 3,
|
||||||
|
|
||||||
// Make sure that tbody elements aren't automatically inserted
|
// Make sure that tbody elements aren't automatically inserted
|
||||||
// IE will insert them into empty tables
|
// IE will insert them into empty tables
|
||||||
tbody: !div.getElementsByTagName("tbody").length,
|
tbody: !div.getElementsByTagName("tbody").length,
|
||||||
|
|
||||||
// Make sure that link elements get serialized correctly by innerHTML
|
// Make sure that link elements get serialized correctly by innerHTML
|
||||||
// This requires a wrapper element in IE
|
// This requires a wrapper element in IE
|
||||||
htmlSerialize: !!div.getElementsByTagName("link").length,
|
htmlSerialize: !!div.getElementsByTagName("link").length,
|
||||||
|
|
||||||
// Get the style information from getAttribute
|
// Get the style information from getAttribute
|
||||||
// (IE uses .cssText insted)
|
// (IE uses .cssText insted)
|
||||||
style: /red/.test( a.getAttribute("style") ),
|
style: /red/.test( a.getAttribute("style") ),
|
||||||
|
|
||||||
// Make sure that URLs aren't manipulated
|
// Make sure that URLs aren't manipulated
|
||||||
// (IE normalizes it by default)
|
// (IE normalizes it by default)
|
||||||
hrefNormalized: a.getAttribute("href") === "/a",
|
hrefNormalized: a.getAttribute("href") === "/a",
|
||||||
|
|
||||||
// Make sure that element opacity exists
|
// Make sure that element opacity exists
|
||||||
// (IE uses filter instead)
|
// (IE uses filter instead)
|
||||||
opacity: a.style.opacity === "0.5",
|
opacity: a.style.opacity === "0.5",
|
||||||
|
|
||||||
// Verify style float existence
|
// Verify style float existence
|
||||||
// (IE uses styleFloat instead of cssFloat)
|
// (IE uses styleFloat instead of cssFloat)
|
||||||
cssFloat: !!a.style.cssFloat,
|
cssFloat: !!a.style.cssFloat,
|
||||||
|
@ -51,14 +51,14 @@
|
||||||
noCloneEvent: true,
|
noCloneEvent: true,
|
||||||
boxModel: null
|
boxModel: null
|
||||||
};
|
};
|
||||||
|
|
||||||
script.type = "text/javascript";
|
script.type = "text/javascript";
|
||||||
try {
|
try {
|
||||||
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
|
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
|
||||||
} catch(e){}
|
} catch(e){}
|
||||||
|
|
||||||
root.insertBefore( script, root.firstChild );
|
root.insertBefore( script, root.firstChild );
|
||||||
|
|
||||||
// Make sure that the execution of code works by injecting a script
|
// Make sure that the execution of code works by injecting a script
|
||||||
// tag with appendChild/createTextNode
|
// tag with appendChild/createTextNode
|
||||||
// (IE doesn't support this, fails, and uses .text instead)
|
// (IE doesn't support this, fails, and uses .text instead)
|
||||||
|
|
Loading…
Reference in a new issue