X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fcore.js;h=6c439a5a6c449d6a8a2b91b1bb31aa3895aee523;hb=0c97178553606c01b999441836e23f9f36c645a3;hp=78f2bcd140fbafc161d8a421e0af79773c5d05b1;hpb=7346a476cc1fe20612fb1e9b08faef27e36a962c;p=jquery.git diff --git a/src/core.js b/src/core.js index 78f2bcd..6c439a5 100644 --- a/src/core.js +++ b/src/core.js @@ -266,6 +266,8 @@ jQuery.fn = jQuery.prototype = { return this.prevObject || jQuery( [] ); }, + // For internal use only. + // Behaves like an Array's .push method, not like a jQuery method. push: [].push, find: function( selector ) { @@ -923,7 +925,7 @@ jQuery.extend({ if ( fragment ) { for ( var i = 0; ret[i]; i++ ) { - if ( jQuery.nodeName( ret[i], "script" ) ) { + if ( jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) { scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] ); } else { if ( ret[i].nodeType === 1 ) @@ -959,7 +961,7 @@ jQuery.extend({ // Safari mis-reports the default selected property of a hidden option // Accessing the parent's selectedIndex property fixes it - if ( name == "selected" ) + if ( name == "selected" && elem.parentNode ) elem.parentNode.selectedIndex; // If applicable, access the attribute via the DOM 0 way