Added a fix for <script>s getting executed twice when .load()ed.

This commit is contained in:
John Resig 2007-01-10 21:31:18 +00:00
parent bb35204326
commit c690472135

View file

@ -77,7 +77,7 @@ jQuery.fn.extend({
complete: function(res, status){
if ( status == "success" || !ifModified && status == "notmodified" )
// Inject the HTML into all the matched elements
self.html(res.responseText)
self.attr("innerHTML", res.responseText)
// Execute all the scripts inside of the newly-injected HTML
.evalScripts()
// Execute callback