diff options
author | John Resig <jeresig@gmail.com> | 2007-07-20 21:59:52 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2007-07-20 21:59:52 +0000 |
commit | c47f6f8f523c8add478fbf5570a67015426f5b86 (patch) | |
tree | e3b2a35fcf1fd3e15ce56bc836bf1c8c994eeb78 /src/jquery/jquery.js | |
parent | 6c5bfffd20797a043355958b1f0d27717ebd20e7 (diff) | |
download | jquery-c47f6f8f523c8add478fbf5570a67015426f5b86.tar.gz jquery-c47f6f8f523c8add478fbf5570a67015426f5b86.zip |
Completely reworked the evalScripts() code, fixing bugs #1332, #975, and #777.
Diffstat (limited to 'src/jquery/jquery.js')
-rw-r--r-- | src/jquery/jquery.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 2f3bc02e5..f54ee30a5 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1171,9 +1171,14 @@ jQuery.fn = jQuery.prototype = { obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody")); jQuery.each( a, function(){ - fn.apply( obj, [ clone ? this.cloneNode(true) : this ] ); + if ( jQuery.nodeName(this, "script") ) { + if ( this.src ) + jQuery.ajax({ url: this.src, async: false, dataType: "script" }); + else + (new Function( this.text || this.textContent || this.innerHTML || "" ))(); + } else + fn.apply( obj, [ clone ? this.cloneNode(true) : this ] ); }); - }); } }; |