Commit 76bde01b authored by Oleg's avatar Oleg

Code style changes

parent 8c4b9f08
...@@ -191,14 +191,14 @@ jQuery.fn.extend({ ...@@ -191,14 +191,14 @@ jQuery.fn.extend({
// See if we can take a shortcut and just use innerHTML // See if we can take a shortcut and just use innerHTML
if ( typeof value === "string" && !rnoInnerhtml.test( value ) && if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
!wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[ 1 ].toLowerCase() ] ) {
value = value.replace( rxhtmlTag, "<$1></$2>" ); value = value.replace( rxhtmlTag, "<$1></$2>" );
try { try {
for (; i < l; i++ ) { for (; i < l; i++ ) {
// Remove element nodes and prevent memory leaks // Remove element nodes and prevent memory leaks
elem = this[i] || {}; elem = this[ i ] || {};
if ( elem.nodeType === 1 ) { if ( elem.nodeType === 1 ) {
jQuery.cleanData( getAll( elem, false ) ); jQuery.cleanData( getAll( elem, false ) );
elem.innerHTML = value; elem.innerHTML = value;
...@@ -301,9 +301,9 @@ jQuery.fn.extend({ ...@@ -301,9 +301,9 @@ jQuery.fn.extend({
} }
callback.call( callback.call(
table && jQuery.nodeName( this[i], "table" ) ? table && jQuery.nodeName( this[ i ], "table" ) ?
findOrAppend( this[i], "tbody" ) : findOrAppend( this[ i ], "tbody" ) :
this[i], this[ i ],
node, node,
i i
); );
...@@ -360,7 +360,7 @@ function disableScript( elem ) { ...@@ -360,7 +360,7 @@ function disableScript( elem ) {
function restoreScript( elem ) { function restoreScript( elem ) {
var match = rscriptTypeMasked.exec( elem.type ); var match = rscriptTypeMasked.exec( elem.type );
if ( match ) { if ( match ) {
elem.type = match[1]; elem.type = match[ 1 ];
} else { } else {
elem.removeAttribute("type"); elem.removeAttribute("type");
} }
...@@ -371,8 +371,8 @@ function restoreScript( elem ) { ...@@ -371,8 +371,8 @@ function restoreScript( elem ) {
function setGlobalEval( elems, refElements ) { function setGlobalEval( elems, refElements ) {
var elem, var elem,
i = 0; i = 0;
for ( ; (elem = elems[i]) != null; i++ ) { for ( ; (elem = elems[ i ]) != null; i++ ) {
jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[ i ], "globalEval" ) );
} }
} }
...@@ -487,7 +487,7 @@ jQuery.each({ ...@@ -487,7 +487,7 @@ jQuery.each({
for ( ; i <= last; i++ ) { for ( ; i <= last; i++ ) {
elems = i === last ? this : this.clone(true); elems = i === last ? this : this.clone(true);
jQuery( insert[i] )[ original ]( elems ); jQuery( insert[ i ] )[ original ]( elems );
// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
core_push.apply( ret, elems.get() ); core_push.apply( ret, elems.get() );
...@@ -505,7 +505,7 @@ function getAll( context, tag ) { ...@@ -505,7 +505,7 @@ function getAll( context, tag ) {
undefined; undefined;
if ( !found ) { if ( !found ) {
for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { for ( found = [], elems = context.childNodes || context; (elem = elems[ i ]) != null; i++ ) {
if ( !tag || jQuery.nodeName( elem, tag ) ) { if ( !tag || jQuery.nodeName( elem, tag ) ) {
found.push( elem ); found.push( elem );
} else { } else {
...@@ -541,10 +541,10 @@ jQuery.extend({ ...@@ -541,10 +541,10 @@ jQuery.extend({
srcElements = getAll( elem ); srcElements = getAll( elem );
// Fix all IE cloning issues // Fix all IE cloning issues
for ( i = 0; (node = srcElements[i]) != null; ++i ) { for ( i = 0; (node = srcElements[ i ]) != null; ++i ) {
// Ensure that the destination node is not null; Fixes #9587 // Ensure that the destination node is not null; Fixes #9587
if ( destElements[i] ) { if ( destElements[ i ] ) {
fixCloneNodeIssues( node, destElements[i] ); fixCloneNodeIssues( node, destElements[ i ] );
} }
} }
} }
...@@ -555,8 +555,8 @@ jQuery.extend({ ...@@ -555,8 +555,8 @@ jQuery.extend({
srcElements = srcElements || getAll( elem ); srcElements = srcElements || getAll( elem );
destElements = destElements || getAll( clone ); destElements = destElements || getAll( clone );
for ( i = 0; (node = srcElements[i]) != null; i++ ) { for ( i = 0; (node = srcElements[ i ]) != null; i++ ) {
cloneCopyEvent( node, destElements[i] ); cloneCopyEvent( node, destElements[ i ] );
} }
} else { } else {
cloneCopyEvent( elem, clone ); cloneCopyEvent( elem, clone );
...@@ -585,7 +585,7 @@ jQuery.extend({ ...@@ -585,7 +585,7 @@ jQuery.extend({
context = document; context = document;
} }
for ( i = 0; (elem = elems[i]) != null; i++ ) { for ( i = 0; (elem = elems[ i ]) != null; i++ ) {
if ( elem || elem === 0 ) { if ( elem || elem === 0 ) {
// Add nodes directly // Add nodes directly
if ( jQuery.type( elem ) === "object" ) { if ( jQuery.type( elem ) === "object" ) {
...@@ -602,9 +602,9 @@ jQuery.extend({ ...@@ -602,9 +602,9 @@ jQuery.extend({
tmp = tmp || container.appendChild( context.createElement("div") ); tmp = tmp || container.appendChild( context.createElement("div") );
// Deserialize a standard representation // Deserialize a standard representation
tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); tag = ( rtagName.exec( elem ) || ["", ""] )[ 1 ].toLowerCase();
wrap = wrapMap[ tag ] || wrapMap._default; wrap = wrapMap[ tag ] || wrapMap._default;
tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + ( wrap[2] || "" ); tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + ( wrap[ 2 ] || "" );
// Descend through wrappers to the right content // Descend through wrappers to the right content
j = wrap[0]; j = wrap[0];
...@@ -635,7 +635,7 @@ jQuery.extend({ ...@@ -635,7 +635,7 @@ jQuery.extend({
} }
if ( fragment ) { if ( fragment ) {
for ( i = 0; (elem = ret[i]) != null; i++ ) { for ( i = 0; (elem = ret[ i ]) != null; i++ ) {
container = jQuery.contains( elem.ownerDocument, elem ); container = jQuery.contains( elem.ownerDocument, elem );
// Append to fragment // Append to fragment
...@@ -653,7 +653,7 @@ jQuery.extend({ ...@@ -653,7 +653,7 @@ jQuery.extend({
// Capture executables // Capture executables
if ( scripts ) { if ( scripts ) {
for ( j = 0; (elem = tmp[j]) != null; j++ ) { for ( j = 0; (elem = tmp[ j ]) != null; j++ ) {
if ( rscriptType.test( elem.type || "" ) ) { if ( rscriptType.test( elem.type || "" ) ) {
scripts.push( elem ); scripts.push( elem );
} }
...@@ -673,7 +673,7 @@ jQuery.extend({ ...@@ -673,7 +673,7 @@ jQuery.extend({
deleteExpando = jQuery.support.deleteExpando, deleteExpando = jQuery.support.deleteExpando,
special = jQuery.event.special; special = jQuery.event.special;
for ( ; (elem = elems[i]) != null; i++ ) { for ( ; (elem = elems[ i ]) != null; i++ ) {
if ( acceptData || jQuery.acceptData( elem ) ) { if ( acceptData || jQuery.acceptData( elem ) ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment