Commit e9ea6679 authored by Oleg's avatar Oleg

Change "isFunc" variable to "isFunction"

parent 76bde01b
...@@ -83,10 +83,10 @@ jQuery.fn.extend({ ...@@ -83,10 +83,10 @@ jQuery.fn.extend({
}, },
wrap: function( html ) { wrap: function( html ) {
var isFunc = jQuery.isFunction( html ); var isFunction = jQuery.isFunction( html );
return this.each(function( i ) { return this.each(function( i ) {
jQuery( this ).wrapAll( isFunc ? html.call(this, i) : html ); jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
}); });
}, },
...@@ -197,7 +197,6 @@ jQuery.fn.extend({ ...@@ -197,7 +197,6 @@ jQuery.fn.extend({
try { try {
for (; i < l; i++ ) { for (; i < l; i++ ) {
// 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 ) );
...@@ -208,7 +207,7 @@ jQuery.fn.extend({ ...@@ -208,7 +207,7 @@ jQuery.fn.extend({
elem = 0; elem = 0;
// If using innerHTML throws an exception, use the fallback method // If using innerHTML throws an exception, use the fallback method
} catch(e) {} } catch( e ) {}
} }
if ( elem ) { if ( elem ) {
...@@ -218,11 +217,11 @@ jQuery.fn.extend({ ...@@ -218,11 +217,11 @@ jQuery.fn.extend({
}, },
replaceWith: function( value ) { replaceWith: function( value ) {
var isFunc = jQuery.isFunction( value ); var isFunction = jQuery.isFunction( value );
// Make sure that the elements are removed from the DOM before they are inserted // Make sure that the elements are removed from the DOM before they are inserted
// this can help fix replacing a parent with child elements // this can help fix replacing a parent with child elements
if ( !isFunc && typeof value !== "string" ) { if ( !isFunction && typeof value !== "string" ) {
value = jQuery( value ).not( this ).detach(); value = jQuery( value ).not( this ).detach();
} }
......
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