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