Skip to content
Permalink
Browse files

remove trailing spaces

  • Loading branch information
brandonaaron committed Mar 23, 2009
1 parent e06da17 commit f8ef75eb9124ce924be5fb521c783efd5c996e33
Showing with 77 additions and 77 deletions.
  1. +3 −3 src/ajax.js
  2. +2 −2 src/attributes.js
  3. +2 −2 src/core.js
  4. +7 −7 src/data.js
  5. +1 −1 src/dimensions.js
  6. +22 −22 src/event.js
  7. +11 −11 src/fx.js
  8. +4 −4 src/manipulation.js
  9. +3 −3 src/offset.js
  10. +14 −14 src/selector.js
  11. +8 −8 src/support.js
@@ -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 );
@@ -70,27 +70,27 @@ 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;
},

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 ?
@@ -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,17 +441,17 @@ 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;
// handle event if we actually just moused on to a non sub-element
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 );
});
});
@@ -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;
}

0 comments on commit f8ef75e

Please sign in to comment.
You can’t perform that action at this time.