jQuery 1.0.4 - New Wave Javascript(js源文件)

2019-06-03 09:49:42刘景俊

                    // Inject the HTML into all the matched elements
                    self.html(res.responseText)
                      // Execute all the scripts inside of the newly-injected HTML
                      .evalScripts()
                      // Execute callback
                      .each( callback, [res.responseText, status, res] );
                } else
                    callback.apply( self, [res.responseText, status, res] );
            }
        });
        return this;
    },
    serialize: function() {
        return jQuery.param( this );
    },
    evalScripts: function() {
        return this.find('script').each(function(){
            if ( this.src )
                // for some weird reason, it doesn't work if the callback is ommited
                jQuery.getScript( this.src );
            else {
                jQuery.globalEval( this.text || this.textContent || this.innerHTML || "" );
            }
        }).end();
    }

});

// If IE is used, create a wrapper for the XMLHttpRequest object